Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
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.
void save (String filename)
 Save rig to filename.
bool equals (Object other)
 Rig is equal to another object.
int hashCode ()
 Hash code for use as dictionary keys.
Bone
int getBoneCount ()
 Number of bones.
int indexOfBoneNamed (String name)
 Index of named bone or -1 if absent.
String boneGetName (int bone)
 Name of bone at index.
Vector boneGetPosition (int bone)
 Bone position.
Quaternion boneGetOrientation (int bone)
 Bone orientation.
Vector boneGetRotation (int bone)
 Bone rotation in degrees.
Matrix getBoneMatrix (int bone)
 Matrix transforming from local bone space to model space in reference pose.
Matrix getBoneInverseMatrix (int bone)
 Matrix transforming from model space to local bone space in reference pose.
Vector boneGetCentralMassPoint (int bone)
 Bone central mass point.
float boneGetMass (int bone)
 Bone mass in kg.
bool boneGetDynamic (int bone)
 Bone is enabled for dynamic simulation if collider rig or collider component is dynamic.
int boneGetParent (int bone)
 Index of parent bone or -1 if bone is a root bone.
int getRootBone ()
 Index of root bone or -1 if no root bone is set.
Bone Inverse Kinematics
Vector boneGetIKLimitsLower (int bone)
 Bone inverse kinematics lower limits used by animator rules.
Vector boneGetIKLimitsUpper (int bone)
 Bone inverse kinematics upper limits used by animator rules.
Vector boneGetIKResistance (int bone)
 Bone inverse kinematics resisteance used by animator rules.
bool boneGetIKLocked (int bone, int axis)
 Bone inverse kinematics per axis locked state used by animator rules.
Bone Constraints
int boneGetConstraintCount (int bone)
 Bone constraint count.
ColliderConstraint boneGetConstraintAt (int bone, int constraint)
 Create collider constraint from bone constraint at index.
Vector boneConstraintGetReferencePosition (int bone, int constraint)
 Position of the reference coordinate frame.
Quaternion boneConstraintGetReferenceOrientation (int bone, int constraint)
 Orientation of the reference coordinate frame.
Vector boneConstraintGetBoneOffset (int bone, int constraint)
 Offset of the bone constraint position relative to the reference coordinate frame.
Bone Shapes
ShapeList boneGetShapes (int bone)
 Bone shapes.
String boneShapeGetProperty (int bone, int shape)
 Bone shape property string.
Shapes
ShapeList getShapes ()
 Shapes.
String shapeGetProperty (int shape)
 Shape property string.
Vector getCentralMassPoint ()
 Rig central mass point.

Constructors

Rig new (String filename)
 Load rig from file.
static void loadAsynchron (String filename, ResourceListener listener)
 Load rig from file asynchronously.

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

References boneGetConstraintCount().

Referenced by getCentralMassPoint().

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

References boneGetIKLocked().

Referenced by getCentralMassPoint().

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

References boneGetIKResistance().

Referenced by getShapes().

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

References boneGetRotation().

Referenced by getRootBone().

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

References boneGetIKLimitsUpper().

Referenced by boneShapeGetProperty().

◆ boneGetConstraintCount()

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

Bone constraint count.

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

References boneGetIKLimitsLower().

Referenced by boneConstraintGetBoneOffset().

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

References getBoneInverseMatrix().

Referenced by boneGetIKLimitsLower().

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

References boneGetDynamic().

Referenced by boneGetConstraintCount().

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

Referenced by boneGetConstraintAt().

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

References getRootBone().

Referenced by boneConstraintGetReferenceOrientation().

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

References boneGetParent().

Referenced by boneConstraintGetReferencePosition().

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

References getBoneMatrix().

Referenced by getRootBone().

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

References getBoneCount(), and indexOfBoneNamed().

Referenced by boneGetOrientation().

◆ boneGetOrientation()

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

Bone orientation.

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

References boneGetName().

Referenced by getBoneMatrix().

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

Referenced by boneGetIKResistance().

◆ boneGetPosition()

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

Bone position.

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

Referenced by boneGetRotation().

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

References boneGetPosition().

Referenced by boneGetCentralMassPoint().

◆ boneGetShapes()

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

Bone shapes.

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

Referenced by getCentralMassPoint().

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

References boneGetConstraintAt().

Referenced by getCentralMassPoint().

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

References equals().

Referenced by equals().

◆ getBoneCount()

int Dragengine.Scenery.Rig.getBoneCount ( )

Number of bones.

Referenced by boneGetName().

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

Referenced by boneGetDynamic().

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

References boneGetOrientation().

Referenced by boneGetMass().

◆ getCentralMassPoint()

Vector Dragengine.Scenery.Rig.getCentralMassPoint ( )

◆ getFilename()

String Dragengine.Scenery.Rig.getFilename ( )

Normalized filename the rig has been loaded from.

References getFilename().

Referenced by getFilename().

◆ getRootBone()

int Dragengine.Scenery.Rig.getRootBone ( )

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

Version
1.11

References boneGetCentralMassPoint(), and boneGetMass().

Referenced by boneGetIKLocked().

◆ getShapes()

ShapeList Dragengine.Scenery.Rig.getShapes ( )

Shapes.

References boneConstraintGetReferencePosition().

Referenced by getCentralMassPoint().

◆ hashCode()

int Dragengine.Scenery.Rig.hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

References hashCode().

Referenced by hashCode().

◆ indexOfBoneNamed()

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

Index of named bone or -1 if absent.

Referenced by boneGetName().

◆ loadAsynchron()

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.

References loadAsynchron().

Referenced by loadAsynchron().

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

References new().

Referenced by new().

◆ save()

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

Save rig to filename.

References save().

Referenced by save().

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

Referenced by getCentralMassPoint().


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