Drag[en]gine Script Module DragonScript
1.23
|
Behavior adding support to randomize position, rotation and scaling. More...
Public Member Functions | |
ECBehaviorInstance | createInstance (BehaviorElement element) |
Create Behavior instance. More... | |
ECPVector | getMaxRotate () |
Maximum rotation in degrees property. More... | |
ECPFloat | getMaxScale () |
Maximum scaling property. More... | |
ECPVector | getMaxTranslate () |
Maximum translation property. More... | |
ECPVector | getMinRotate () |
Minimum rotation in degrees property. More... | |
ECPFloat | getMinScale () |
Minimum scaling property. More... | |
ECPVector | getMinTranslate () |
Minimum translation property. More... | |
ECPBoolean | getRandomize () |
Randomize property. More... | |
ECBehaviorRandomizeGeometry | new (BehaviorElementClass eclass) |
Create behavior. More... | |
void | prepareStub (StubElement stub, GameWorld gameWorld, bool loading) |
Prepare stub. More... | |
Public Member Functions inherited from Dragengine.Scenery.DefaultECBehavior | |
void | assignInstanceIndex (int instanceIndex) |
Assign instance index. More... | |
void | dispose () |
Dispose of behavior. More... | |
String | getBehaviorID () |
Unique identifier of behavior. More... | |
String | getID () |
Identifier. More... | |
int | getInstanceIndex () |
Instance index. More... | |
void | loadSupportedData (String identifier, PersistencyEnvironment env, FileReader reader, ECBehaviorInstance instance) |
Load instance data of another behavior. More... | |
bool | supportsBehaviorID (String identifier) |
Behavior supports loading instance data of another behavior. More... | |
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. More... | |
void | setBehaviorID (String identifier) |
Set behavior identifier. More... | |
void | useClassNameAsBehaviorID () |
Set behavior identifier to "<class-name>:<identifier>". More... | |
void | useFullyQualifiedClassNameAsBehaviorID () |
Set behavior identifier to "<fully-qualified-class-name>:<identifier>". More... | |
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.
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.
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.
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.
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.
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.
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.
ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.getRandomize | ( | ) |
Randomize property.
Property name is "randomize". Default value is true.
ECBehaviorRandomizeGeometry Dragengine.Scenery.ECBehaviorRandomizeGeometry.new | ( | BehaviorElementClass | eclass | ) |
Create behavior.
Reimplemented from Dragengine.Scenery.DefaultECBehavior.
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.
ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinRotate |
ECPFloat Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinScale |
ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinTranslate |
ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.pRandomize |