Drag[en]gine Script Module DragonScript
1.21
|
Immutable rig resources. More...
Public Member Functions | |
Management | |
String | getFilename () |
Normalized filename the rig has been loaded from. More... | |
void | save (String filename) |
Save rig to filename. More... | |
bool | equals (Object other) |
Rig is equal to another object. More... | |
int | hashCode () |
Hash code for use as dictionary keys. More... | |
Bone | |
int | getBoneCount () |
Number of bones. More... | |
int | indexOfBoneNamed (String name) |
Index of named bone or -1 if absent. More... | |
String | boneGetName (int bone) |
Name of bone at index. More... | |
Vector | boneGetPosition (int bone) |
Bone position. More... | |
Quaternion | boneGetOrientation (int bone) |
Bone orientation. More... | |
Vector | boneGetRotation (int bone) |
Bone rotation in degrees. More... | |
Matrix | getBoneMatrix (int bone) |
Matrix transforming from local bone space to model space in reference pose. More... | |
Matrix | getBoneInverseMatrix (int bone) |
Matrix transforming from model space to local bone space in reference pose. More... | |
Vector | boneGetCentralMassPoint (int bone) |
Bone central mass point. More... | |
float | boneGetMass (int bone) |
Bone mass in kg. More... | |
bool | boneGetDynamic (int bone) |
Bone is enabled for dynamic simulation if collider rig or collider component is dynamic. More... | |
int | boneGetParent (int bone) |
Index of parent bone or -1 if bone is a root bone. More... | |
int | getRootBone () |
Index of root bone or -1 if no root bone is set. More... | |
Bone Inverse Kinematics | |
Vector | boneGetIKLimitsLower (int bone) |
Bone inverse kinematics lower limits used by animator rules. More... | |
Vector | boneGetIKLimitsUpper (int bone) |
Bone inverse kinematics upper limits used by animator rules. More... | |
Vector | boneGetIKResistance (int bone) |
Bone inverse kinematics resisteance used by animator rules. More... | |
bool | boneGetIKLocked (int bone, int axis) |
Bone inverse kinematics per axis locked state used by animator rules. More... | |
Bone Constraints | |
int | boneGetConstraintCount (int bone) |
Bone constraint count. More... | |
ColliderConstraint | boneGetConstraintAt (int bone, int constraint) |
Create collider constraint from bone constraint at index. More... | |
Vector | boneConstraintGetReferencePosition (int bone, int constraint) |
Position of the reference coordinate frame. More... | |
Quaternion | boneConstraintGetReferenceOrientation (int bone, int constraint) |
Orientation of the reference coordinate frame. More... | |
Vector | boneConstraintGetBoneOffset (int bone, int constraint) |
Offset of the bone constraint position relative to the reference coordinate frame. More... | |
Bone Shapes | |
ShapeList | boneGetShapes (int bone) |
Bone shapes. More... | |
String | boneShapeGetProperty (int bone, int shape) |
Bone shape property string. More... | |
Shapes | |
ShapeList | getShapes () |
Shapes. More... | |
String | shapeGetProperty (int shape) |
Shape property string. More... | |
Vector | getCentralMassPoint () |
Rig central mass point. More... | |
Constructors | |
Rig | new (String filename) |
Load rig from file. More... | |
static void | loadAsynchron (String filename, ResourceListener listener) |
Load rig from file asynchronously. More... | |
Immutable rig resources.
Rig resources provide deforming models, physicsl simulation and collision detection as well as properties for animation.
This is a native class. It can not be subclassed.
Vector Dragengine.Scenery.Rig.boneConstraintGetBoneOffset | ( | int | bone, |
int | constraint | ||
) |
Offset of the bone constraint position relative to the reference coordinate frame.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
EOutOfBoundary | constraint is less than 0 or greater than or equal to boneGetConstraintCount(). |
Quaternion Dragengine.Scenery.Rig.boneConstraintGetReferenceOrientation | ( | int | bone, |
int | constraint | ||
) |
Orientation of the reference coordinate frame.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
EOutOfBoundary | constraint is less than 0 or greater than or equal to boneGetConstraintCount(). |
Vector Dragengine.Scenery.Rig.boneConstraintGetReferencePosition | ( | int | bone, |
int | constraint | ||
) |
Position of the reference coordinate frame.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
EOutOfBoundary | constraint is less than 0 or greater than or equal to boneGetConstraintCount(). |
Vector Dragengine.Scenery.Rig.boneGetCentralMassPoint | ( | int | bone | ) |
Bone central mass point.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
ColliderConstraint Dragengine.Scenery.Rig.boneGetConstraintAt | ( | int | bone, |
int | constraint | ||
) |
Create collider constraint from bone constraint at index.
The created collider constraint can be added to a ColliderRig or ColliderComponent. This is useful if a rig only serves as source for collider bone constraints dynamically managed at runtime or replacing bone constraints with modified versions for example in response to collisions.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
EOutOfBoundary | constraint is less than 0 or greater than or equal to boneGetConstraintCount(). |
int Dragengine.Scenery.Rig.boneGetConstraintCount | ( | int | bone | ) |
Bone constraint count.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
bool Dragengine.Scenery.Rig.boneGetDynamic | ( | int | bone | ) |
Bone is enabled for dynamic simulation if collider rig or collider component is dynamic.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Vector Dragengine.Scenery.Rig.boneGetIKLimitsLower | ( | int | bone | ) |
Bone inverse kinematics lower limits used by animator rules.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Vector Dragengine.Scenery.Rig.boneGetIKLimitsUpper | ( | int | bone | ) |
Bone inverse kinematics upper limits used by animator rules.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
bool Dragengine.Scenery.Rig.boneGetIKLocked | ( | int | bone, |
int | axis | ||
) |
Bone inverse kinematics per axis locked state used by animator rules.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Vector Dragengine.Scenery.Rig.boneGetIKResistance | ( | int | bone | ) |
Bone inverse kinematics resisteance used by animator rules.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
float Dragengine.Scenery.Rig.boneGetMass | ( | int | bone | ) |
Bone mass in kg.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
String Dragengine.Scenery.Rig.boneGetName | ( | int | bone | ) |
Name of bone at index.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Quaternion Dragengine.Scenery.Rig.boneGetOrientation | ( | int | bone | ) |
Bone orientation.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
int Dragengine.Scenery.Rig.boneGetParent | ( | int | bone | ) |
Index of parent bone or -1 if bone is a root bone.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Vector Dragengine.Scenery.Rig.boneGetPosition | ( | int | bone | ) |
Bone position.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Vector Dragengine.Scenery.Rig.boneGetRotation | ( | int | bone | ) |
Bone rotation in degrees.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
ShapeList Dragengine.Scenery.Rig.boneGetShapes | ( | int | bone | ) |
Bone shapes.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
String Dragengine.Scenery.Rig.boneShapeGetProperty | ( | int | bone, |
int | shape | ||
) |
Bone shape property string.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
EOutOfBoundary | shape is less than 0 or greater than or equal to boneGetShapes().getCount(). |
bool Dragengine.Scenery.Rig.equals | ( | Object | other | ) |
int Dragengine.Scenery.Rig.getBoneCount | ( | ) |
Number of bones.
Matrix Dragengine.Scenery.Rig.getBoneInverseMatrix | ( | int | bone | ) |
Matrix transforming from model space to local bone space in reference pose.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
Matrix Dragengine.Scenery.Rig.getBoneMatrix | ( | int | bone | ) |
Matrix transforming from local bone space to model space in reference pose.
EOutOfBoundary | bone is less than 0 or greater than or equal to getBoneCount(). |
String Dragengine.Scenery.Rig.getFilename | ( | ) |
Normalized filename the rig has been loaded from.
int Dragengine.Scenery.Rig.getRootBone | ( | ) |
Index of root bone or -1 if no root bone is set.
ShapeList Dragengine.Scenery.Rig.getShapes | ( | ) |
Shapes.
int Dragengine.Scenery.Rig.hashCode | ( | ) |
Hash code for use as dictionary keys.
Implements Object.hashCode().
int Dragengine.Scenery.Rig.indexOfBoneNamed | ( | String | name | ) |
Index of named bone or -1 if absent.
|
static |
Load rig from file asynchronously.
Registers a request in the game engine to load an rig. Once finished or if the file is already loaded the listener is used to deliver the loaded rig or null if the loading failed.
Rig Dragengine.Scenery.Rig.new | ( | String | filename | ) |
Load rig from file.
If the rig file has been already loaded it is assigned to this object. If the rig is not loaded yet the engine loads the rig. This call blocks until the rig is fully loaded and ready to be used. For asynchronous loading use loadAsynchron(). Multiple objects can point to the same loaded rig resource. Once no object instance uses an rig file anymore it is released from memory.
void Dragengine.Scenery.Rig.save | ( | String | filename | ) |
Save rig to filename.
String Dragengine.Scenery.Rig.shapeGetProperty | ( | int | shape | ) |
Shape property string.
EOutOfBoundary | shape is less than 0 or greater than or equal to getShapes().getCount(). |