|
Drag[en]gine Script Module DragonScript 1.35
|
Behavior adding support to randomize position, rotation and scaling. More...
Classes | |
| class | Factory |
| Behavior factory. More... | |
Public Member Functions | |
| ECBehaviorInstance | createInstance (BehaviorElement element) |
| Create Behavior instance. | |
| ECPVector | getMaxRotate () |
| Maximum rotation in degrees property. | |
| ECPFloat | getMaxScale () |
| Maximum scaling property. | |
| ECPVector | getMaxTranslate () |
| Maximum translation property. | |
| ECPVector | getMinRotate () |
| Minimum rotation in degrees property. | |
| ECPFloat | getMinScale () |
| Minimum scaling property. | |
| ECPVector | getMinTranslate () |
| Minimum translation property. | |
| ECPBoolean | getRandomize () |
| Randomize property. | |
| ECBehaviorRandomizeGeometry | new (BehaviorElementClass eclass) |
| Create behavior. | |
| void | prepareStub (StubElement stub, GameWorld gameWorld, bool loading) |
| Prepare stub. | |
| Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| void | assignInstanceIndex (int instanceIndex) |
| Assign instance index. | |
| void | dispose () |
| Dispose of behavior. | |
| String | getBehaviorID () |
| Unique identifier of behavior. | |
| String | getID () |
| Identifier. | |
| int | getInstanceIndex () |
| Instance index. | |
| void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
| Load instance data of another behavior. | |
| bool | supportsBehaviorID (String identifier) |
| Behavior supports loading instance data of another behavior. | |
Public Attributes | |
| ECPVector | pMinRotate |
| ECPFloat | pMinScale |
| ECPVector | pMinTranslate |
| ECPBoolean | pRandomize |
Additional Inherited Members | |
| Protected Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
| DefaultECBehavior | new (BehaviorElementClass eclass, String id) |
| Create default composeable behavior. | |
| void | setBehaviorID (String identifier) |
| Set behavior identifier. | |
| void | useClassNameAsBehaviorID () |
| Set behavior identifier to "<class-name>:<identifier>". | |
| void | useFullyQualifiedClassNameAsBehaviorID () |
| Set behavior identifier to "<fully-qualified-class-name>:<identifier>". | |
Behavior adding support to randomize position, rotation and scaling.
This behavior is typically used to add variation to multiple instances of the same element added to a game world by randomizing the position, rotation and scaling before creating the element.
This behavior uses BehaviorPrepareStub to apply the changes before the element is actually created. No randomizing is done if the element is created while loading a game world.
Default property prefix is "randomizeGeometry."
| ECBehaviorInstance Dragengine.Scenery.ECBehaviorRandomizeGeometry.createInstance | ( | BehaviorElement | element | ) |
Create Behavior instance.
Implements Dragengine.Scenery.ECBehavior.
References createInstance(), getMaxRotate(), getMaxScale(), getMinRotate(), getMinScale(), new(), pMinRotate, pMinScale, pMinTranslate, pRandomize, and prepareStub().
Referenced by createInstance().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMaxRotate | ( | ) |
Maximum rotation in degrees property.
Rotation is randomly chosen between minimum and maximum rotation. Property name is "maxRotate". Default value is 0-Vector.
References getRandomize(), and pRandomize.
Referenced by createInstance().
| ECPFloat Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMaxScale | ( | ) |
Maximum scaling property.
Scaling is randomly chosen between minimum and maximum scaling. Property name is "maxScale". Default value is 1. Minimum value is 1.
References getMaxTranslate().
Referenced by createInstance().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMaxTranslate | ( | ) |
Maximum translation property.
Translation is randomly chosen between minimum and maximum translation. Property name is "maxTranslate". Default value is 0-Vector.
References new(), and pMinScale.
Referenced by getMaxScale().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMinRotate | ( | ) |
Minimum rotation in degrees property.
Rotation is randomly chosen between minimum and maximum rotation. Property name is "minRotate". Default value is 0-Vector.
Referenced by createInstance().
| ECPFloat Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMinScale | ( | ) |
Minimum scaling property.
Scaling is randomly chosen between minimum and maximum scaling. Property name is "minScale". Default value is 0. Minimum value is 1.
References getMinTranslate(), and pMinTranslate.
Referenced by createInstance().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.getMinTranslate | ( | ) |
Minimum translation property.
Translation is randomly chosen between minimum and maximum translation. Property name is "minTranslate". Default value is 0-Vector.
References new(), and pMinRotate.
Referenced by getMinScale().
| ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.getRandomize | ( | ) |
Randomize property.
Property name is "randomize". Default value is true.
References new(), pMinTranslate, and pRandomize.
Referenced by getMaxRotate().
| ECBehaviorRandomizeGeometry Dragengine.Scenery.ECBehaviorRandomizeGeometry.new | ( | BehaviorElementClass | eclass | ) |
Create behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
References pMinRotate, pMinScale, pMinTranslate, and pRandomize.
Referenced by createInstance(), getMaxTranslate(), getMinTranslate(), and getRandomize().
| void Dragengine.Scenery.ECBehaviorRandomizeGeometry.prepareStub | ( | StubElement | stub, |
| GameWorld | gameWorld, | ||
| bool | loading ) |
Prepare stub.
Called by BehaviorElementClass.createAndAddElement(StubElement,GameWorld) with loading set to false and BehaviorElementClass.loadAndAddElement(PersistencyEnvironment,StubElement,FileReader,GameWorld) with loading set to true.
Implements Dragengine.Scenery.BehaviorPrepareStub.
Referenced by createInstance().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinRotate |
Referenced by createInstance(), getMinTranslate(), and new().
| ECPFloat Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinScale |
Referenced by createInstance(), getMaxTranslate(), and new().
| ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinTranslate |
Referenced by createInstance(), getMinScale(), getRandomize(), and new().
| ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.pRandomize |
Referenced by createInstance(), getMaxRotate(), getRandomize(), and new().