Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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

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

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

See also
https://developer.dragondreams.ch/wiki/doku.php/dragengine:modules:dragonscript:behavior_randomizegeometry

Member Function Documentation

◆ createInstance()

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

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

References getRandomize(), and pRandomize.

Referenced by createInstance().

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

References getMaxTranslate().

Referenced by createInstance().

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

References new(), and pMinScale.

Referenced by getMaxScale().

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

Referenced by createInstance().

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

References getMinTranslate(), and pMinTranslate.

Referenced by createInstance().

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

References new(), and pMinRotate.

Referenced by getMinScale().

◆ getRandomize()

ECPBoolean Dragengine.Scenery.ECBehaviorRandomizeGeometry.getRandomize ( )

Randomize property.

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

References new(), pMinTranslate, and pRandomize.

Referenced by getMaxRotate().

◆ new()

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

◆ 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: