Drag[en]gine Script Module DragonScript
1.23
|
Public Member Functions | |
Constructors | |
RigBuilder | new () |
Create rig builder. More... | |
Management | |
Rig | build (String filename) |
Build rig using filename. More... | |
void | buildRig () |
Build rig. More... | |
void | setModelCollision (bool modelCollision) |
Set if component model is used for collision instead of shapes if present. More... | |
void | addBone (String name, int parent, Vector position, Vector rotation, Vector centralMassPoint, bool dynamic, float mass, Vector ikLimitsLower, Vector ikLimitsUpper, Vector ikResistance, bool ikLockedX, bool ikLockedY, bool ikLockedZ, ShapeList shapes) |
Add bone. More... | |
void | setBoneShapeProperties (int index, Array properties) |
Set shape properties to bone. More... | |
void | addBoneConstraint (int bone, Vector referencePosition, Quaternion referenceOrientation, Vector boneOffset, float linearDamping, float angularDamping, float springDamping, bool isRope, float breakingThreshold, int parentBone) |
Add bone constraint. More... | |
void | setBoneConstraintDof (int bone, int constraint, ColliderConstraintDof dof, float lowerLimit, float upperLimit, float staticFriction, float kinematicFriction, float springStiffness) |
Set bone constraint dof. More... | |
void | setRootBone (int bone) |
Set root bone. More... | |
void | setShapes (ShapeList shapes) |
Set shapes. More... | |
void | setShapeProperties (Array properties) |
Set shape properties. More... | |
Rig builder.
Builds rig resource without requiring a rig resource file. The created rig can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named rigs can not clash with filenames present in the virtual file system. For this reason use unnamed rigs if possible. Using named rigs though can be useful if you want to provide rig resources to scripts not needing to know if the path they try to load is a build rig instead of a resource one.
To use the rig builder create a subclass and implement RigBuilder.buildRig() . You are only allowed to call methods from RigBuilder from inside this function call. To create the rig call RigBuilder.build() . This will call RigBuilder.buildRig() to fill a new rig resource with content. Once finished the build method returns the ready to use rig resource. Otherwise an exception is thrown.
This is a native class.
|
protected |
Add bone.
Resets all bone shape properties to empty string.
|
protected |
Add bone constraint.
Rig Dragengine.Scenery.RigBuilder.build | ( | String | filename | ) |
Build rig using filename.
The created rig can either be unnamed (if filename is empty string) or named (if filename is not empty string). Named rigs can not clash with filenames present in the virtual file system. For this reason use unnamed rigs if possible. Using named rigs though can be useful if you want to provide rig resources to scripts not needing to know if the path they try to load is a build rig instead of a resource one.
To create the rig call build() . This will call buildRig() to fill a new rig resource with content. Once finished the build method returns the ready to use rig resource. Otherwise an exception is thrown.
|
protected |
Build rig.
Called by build(String) to fill a new rig resource with content. You are only allowed to call methods from RigBuilder from inside this function call.
RigBuilder Dragengine.Scenery.RigBuilder.new | ( | ) |
Create rig builder.
|
protected |
Set bone constraint dof.
|
protected |
Set shape properties to bone.
Properties array has to contain the same number of objects as the bone has shapes. The first array object is assigned to the first bone shape and so forth. The array should contain strings but any object supporting an appropriate toString() implementation is valid too.
|
protected |
Set if component model is used for collision instead of shapes if present.
|
protected |
Set root bone.
|
protected |
Set shape properties.
Properties array has to contain the same number of objects as the rig has shapes. The first array object is assigned to the first rig shape and so forth. The array should contain strings but any object supporting an appropriate toString() implementation is valid too.
|
protected |
Set shapes.
Resets all shape properties to empty string.