Drag[en]gine Script Module DragonScript Script API  1.0
Rig Class Reference

Immutable rig resources. More...

Inheritance diagram for Rig:

Public Member Functions

Management
String getFilename ()
 Normalized filename the rig has been loaded from. 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 getBonePosition (int bone)
 Bone position. More...
 
Quaternion getBoneOrientation (int bone)
 Bone orientation. More...
 
Vector getBoneCentralMassPoint (int bone)
 Bone central mass point. More...
 
float boneGetMass (int bone)
 Bone mass in kg. More...
 
bool getBoneDynamic (int bone)
 Bone is enabled for dynamic simulation if collider rig or collider component is dynamic. More...
 
Bone Inverse Kinematics
Vector getBoneIKLimitsLower (int bone)
 Bone inverse kinematics lower limits used by animator rules. More...
 
Vector getBoneIKLimitsUpper (int bone)
 Bone inverse kinematics upper limits used by animator rules. More...
 
Vector getBoneIKResistance (int bone)
 Bone inverse kinematics resisteance used by animator rules. More...
 
bool getBoneIKLocked (int bone, int axis)
 Bone inverse kinematics per axis locked state used by animator rules. More...
 
Bone Constraints
int getBoneConstraintCount (int bone)
 Bone constraint count. More...
 
ColliderConstraint getBoneConstraintAt (int bone, int constraint)
 Create collider constraint from bone constraint at index. 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...
 

Constructors

Rig new (String filename)
 Load rig from file. More...
 
static void loadAsynchron (String filename, ResourceNotifier notifier)
 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.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ boneGetMass()

float boneGetMass ( int  bone)

Bone mass in kg.

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

§ boneGetName()

String boneGetName ( int  bone)

Name of bone at index.

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

§ boneGetShapes()

ShapeList boneGetShapes ( int  bone)

Bone shapes.

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

§ boneShapeGetProperty()

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

§ getBoneCentralMassPoint()

Vector getBoneCentralMassPoint ( int  bone)

Bone central mass point.

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

§ getBoneConstraintAt()

ColliderConstraint getBoneConstraintAt ( 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 getBoneConstraintCount().

§ getBoneConstraintCount()

int getBoneConstraintCount ( int  bone)

Bone constraint count.

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

§ getBoneCount()

int getBoneCount ( )

Number of bones.

§ getBoneDynamic()

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

§ getBoneIKLimitsLower()

Vector getBoneIKLimitsLower ( int  bone)

Bone inverse kinematics lower limits used by animator rules.

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

§ getBoneIKLimitsUpper()

Vector getBoneIKLimitsUpper ( int  bone)

Bone inverse kinematics upper limits used by animator rules.

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

§ getBoneIKLocked()

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

§ getBoneIKResistance()

Vector getBoneIKResistance ( int  bone)

Bone inverse kinematics resisteance used by animator rules.

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

§ getBoneOrientation()

Quaternion getBoneOrientation ( int  bone)

Bone orientation.

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

§ getBonePosition()

Vector getBonePosition ( int  bone)

Bone position.

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

§ getFilename()

String getFilename ( )

Normalized filename the rig has been loaded from.

§ getShapes()

ShapeList getShapes ( )

Shapes.

§ hashCode()

int hashCode ( )

Hash code for use as dictionary keys.

Implements Object.hashCode().

§ indexOfBoneNamed()

int indexOfBoneNamed ( String  name)

Index of named bone or -1 if absent.

§ loadAsynchron()

static void loadAsynchron ( String  filename,
ResourceNotifier  notifier 
)
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 notifier is used to deliver the loaded rig or null if the loading failed.

§ new()

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.

§ shapeGetProperty()

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