Drag[en]gine Script Module DragonScript  1.23
Dragengine.Scenery.ECBehaviorRandomizeGeometry Class Reference

Behavior adding support to randomize position, rotation and scaling. More...

Inheritance diagram for Dragengine.Scenery.ECBehaviorRandomizeGeometry:
Dragengine.Scenery.DefaultECBehavior Dragengine.Scenery.BehaviorPrepareStub Dragengine.Scenery.ECBehavior Dragengine.Scenery.BehaviorCompatiblePersistency

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...
 

Detailed Description

Behavior adding support to randomize position, rotation and scaling.

Version
1.23

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."

Member Function Documentation

◆ createInstance()

ECBehaviorInstance Dragengine.Scenery.ECBehaviorRandomizeGeometry.createInstance ( BehaviorElement  element)

Create Behavior instance.

Implements Dragengine.Scenery.ECBehavior.

◆ getMaxRotate()

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.

◆ getMaxScale()

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.

◆ getMaxTranslate()

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.

◆ getMinRotate()

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.

◆ getMinScale()

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.

◆ getMinTranslate()

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.

◆ getRandomize()

ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.getRandomize ( )

Randomize property.

Property name is "randomize". Default value is true.

◆ new()

ECBehaviorRandomizeGeometry Dragengine.Scenery.ECBehaviorRandomizeGeometry.new ( BehaviorElementClass  eclass)

Create behavior.

Reimplemented from Dragengine.Scenery.DefaultECBehavior.

◆ prepareStub()

void Dragengine.Scenery.ECBehaviorRandomizeGeometry.prepareStub ( StubElement  stub,
GameWorld  gameWorld,
bool  loading 
)

Member Data Documentation

◆ pMinRotate

ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinRotate

◆ pMinScale

ECPFloat Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinScale

◆ pMinTranslate

ECPVector Dragengine.Scenery.ECBehaviorRandomizeGeometry.pMinTranslate

◆ pRandomize

ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.pRandomize

The documentation for this class was generated from the following file: