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

Immutable rig resources. More...

Inheritance diagram for Dragengine.Scenery.Rig:

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

Detailed Description

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.

Member Function Documentation

◆ boneConstraintGetBoneOffset()

Vector Dragengine.Scenery.Rig.boneConstraintGetBoneOffset ( int  bone,
int  constraint 
)

Offset of the bone constraint position relative to the reference coordinate frame.

Version
1.11
Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().
EOutOfBoundaryconstraint is less than 0 or greater than or equal to boneGetConstraintCount().

◆ boneConstraintGetReferenceOrientation()

Quaternion Dragengine.Scenery.Rig.boneConstraintGetReferenceOrientation ( int  bone,
int  constraint 
)

Orientation of the reference coordinate frame.

Version
1.11
Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().
EOutOfBoundaryconstraint is less than 0 or greater than or equal to boneGetConstraintCount().

◆ boneConstraintGetReferencePosition()

Vector Dragengine.Scenery.Rig.boneConstraintGetReferencePosition ( int  bone,
int  constraint 
)

Position of the reference coordinate frame.

Version
1.11
Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().
EOutOfBoundaryconstraint is less than 0 or greater than or equal to boneGetConstraintCount().

◆ boneGetCentralMassPoint()

Vector Dragengine.Scenery.Rig.boneGetCentralMassPoint ( int  bone)

Bone central mass point.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetConstraintAt()

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.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().
EOutOfBoundaryconstraint is less than 0 or greater than or equal to boneGetConstraintCount().

◆ boneGetConstraintCount()

int Dragengine.Scenery.Rig.boneGetConstraintCount ( int  bone)

Bone constraint count.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetDynamic()

bool Dragengine.Scenery.Rig.boneGetDynamic ( int  bone)

Bone is enabled for dynamic simulation if collider rig or collider component is dynamic.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetIKLimitsLower()

Vector Dragengine.Scenery.Rig.boneGetIKLimitsLower ( int  bone)

Bone inverse kinematics lower limits used by animator rules.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetIKLimitsUpper()

Vector Dragengine.Scenery.Rig.boneGetIKLimitsUpper ( int  bone)

Bone inverse kinematics upper limits used by animator rules.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetIKLocked()

bool Dragengine.Scenery.Rig.boneGetIKLocked ( int  bone,
int  axis 
)

Bone inverse kinematics per axis locked state used by animator rules.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetIKResistance()

Vector Dragengine.Scenery.Rig.boneGetIKResistance ( int  bone)

Bone inverse kinematics resisteance used by animator rules.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetMass()

float Dragengine.Scenery.Rig.boneGetMass ( int  bone)

Bone mass in kg.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetName()

String Dragengine.Scenery.Rig.boneGetName ( int  bone)

Name of bone at index.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetOrientation()

Quaternion Dragengine.Scenery.Rig.boneGetOrientation ( int  bone)

Bone orientation.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetParent()

int Dragengine.Scenery.Rig.boneGetParent ( int  bone)

Index of parent bone or -1 if bone is a root bone.

Version
1.6
Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetPosition()

Vector Dragengine.Scenery.Rig.boneGetPosition ( int  bone)

Bone position.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetRotation()

Vector Dragengine.Scenery.Rig.boneGetRotation ( int  bone)

Bone rotation in degrees.

Version
1.11
Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneGetShapes()

ShapeList Dragengine.Scenery.Rig.boneGetShapes ( int  bone)

Bone shapes.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ boneShapeGetProperty()

String Dragengine.Scenery.Rig.boneShapeGetProperty ( int  bone,
int  shape 
)

Bone shape property string.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().
EOutOfBoundaryshape is less than 0 or greater than or equal to boneGetShapes().getCount().

◆ equals()

bool Dragengine.Scenery.Rig.equals ( Object  other)

Rig is equal to another object.

Implements Object.equals(Object).

Returns
true if other is of type Rig and both point to the same engine rig resource.

◆ getBoneCount()

int Dragengine.Scenery.Rig.getBoneCount ( )

Number of bones.

◆ getBoneInverseMatrix()

Matrix Dragengine.Scenery.Rig.getBoneInverseMatrix ( int  bone)

Matrix transforming from model space to local bone space in reference pose.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ getBoneMatrix()

Matrix Dragengine.Scenery.Rig.getBoneMatrix ( int  bone)

Matrix transforming from local bone space to model space in reference pose.

Exceptions
EOutOfBoundarybone is less than 0 or greater than or equal to getBoneCount().

◆ getCentralMassPoint()

Vector Dragengine.Scenery.Rig.getCentralMassPoint ( )

Rig central mass point.

Version
1.11

◆ getFilename()

String Dragengine.Scenery.Rig.getFilename ( )

Normalized filename the rig has been loaded from.

◆ getRootBone()

int Dragengine.Scenery.Rig.getRootBone ( )

Index of root bone or -1 if no root bone is set.

Version
1.11

◆ getShapes()

ShapeList Dragengine.Scenery.Rig.getShapes ( )

Shapes.

◆ hashCode()

int Dragengine.Scenery.Rig.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

◆ indexOfBoneNamed()

int Dragengine.Scenery.Rig.indexOfBoneNamed ( String  name)

Index of named bone or -1 if absent.

◆ loadAsynchron()

static void Dragengine.Scenery.Rig.loadAsynchron ( String  filename,
ResourceListener  listener 
)
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.

◆ new()

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.

◆ save()

void Dragengine.Scenery.Rig.save ( String  filename)

Save rig to filename.

◆ shapeGetProperty()

String Dragengine.Scenery.Rig.shapeGetProperty ( int  shape)

Shape property string.

Exceptions
EOutOfBoundaryshape is less than 0 or greater than or equal to getShapes().getCount().

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