Name | Description |
skeletalmesh | The SkeletalMesh this bone is attached to. |
Declaration SkeletalMesh *skeletalmesh
|
physicobject | The PhysicObject attached to the current bone. |
Declaration PhysicObject *physicobject This variable is set to nil until the AddPhysics is called. Once created you can manipulate the PhysicObject properties using the reference.
|
attachment_count | The number of object(s) attached to the current bone. |
Declaration unsigned short attachment_count
|
constraint_count | Total number of transformation Constraint attached to the bone. |
Declaration unsigned char constraint_count
|
skin_matrix | Final transformation matrix of the Bone ready to be multiplying by its associated Object world_matrix . |
Declaration - Note
- The
skin_matrix is calculated as follow which is a multiplication of the Bone pose_matrix by the Skeleton Joint inverse_matrix . It is the matrix that is used to draw the vertices attached to a Bone.
|
Name | Description
|
flags | Flags used to toggle on/off the bone states using the bit module. |
Declaration
Cap | Value | Description |
BON_FLAG_LOCK_LOCX | bit.lshift(1,3) | Lock/unlock the location X axis. |
BON_FLAG_LOCK_LOCY | bit.lshift(1,4) | Lock/unlock the location Y axis. |
BON_FLAG_LOCK_LOCZ | bit.lshift(1,5) | Lock/unlock the location Z axis. |
BON_FLAG_LOCK_ROTX | bit.lshift(1,6) | Lock/unlock the rotation X axis. |
BON_FLAG_LOCK_ROTY | bit.lshift(1,7) | Lock/unlock the rotation Y axis. |
BON_FLAG_LOCK_ROTZ | bit.lshift(1,8) | Lock/unlock the rotation Z axis. |
BON_FLAG_LOCK_ROTW | bit.lshift(1,9) | Lock/unlock the rotation Z axis. |
BON_FLAG_LOCK_SCLX | bit.lshift(1,10) | Lock/unlock the scale X axis. |
BON_FLAG_ROT_MODE_QUAT | bit.lshift(1,16) | Force the bone to use quaternions (default) instead of Euler angles. |
BON_FLAG_ROT_MODE_QUAT | bit.lshift(1,17) | Hint the user that the rotation method should not be changed. |
- Note
- The caps used here are basically the same as declared in Object.
|
selected | Controls the selection state of the active bone. |
Declaration
|
visible | Controls the visibility of the active bone in the 3d view. |
Declaration
|
location | The current location of the bone relative to its parent (if any). |
Declaration
|
rotation | The current local rotation of the bone relative to its parent. |
Declaration - Note
- The rotation can either be expressed as euler angle (XYZ) or quaternion (XYZW) depending on the bone rotation mode.
|
scale | Controls the active scale of the bone. |
Declaration
|
basis_matrix | Controls the transformation matrix relative to the bone parent (if any). |
Declaration - Note
- It is the matrix that is used to transform the vertices attached to a Bone.
|
pose_matrix | The Bone transformation matrix used to animate the vertices associated to the bone. |
Declaration - Note
- The
pose_matrix calculated by multiplying the parent pose_matrix (if any) with the active bone basis_matrix .
|
Name | Description |
AddPhysics | Create a new PhysicObject; the base structure to add physics to the current bone. |
Declaration PhysicObject *AddPhysics( void ) Return Value
A new PhysicObject.
|
RemovePhysics | Remove bone physics. |
Declaration bool RemovePhysics( void )
|
GetAttachment | Return a specific bone attachment using the Object name as key. |
Declaration Object *GetAttachment( const char *name ) Parameters
name : The name of the attachment object to retrieve.
Return Value
The Object specified by the name parameter; else return nil .
|
GetAttachmentAt | Get an Object attachment at a specific index. |
Declaration Object *GetAttachmentAt( unsigned short index ) Parameters
index : The index of the attachment to retrieve.
Return Value
The attachment located at the index specified if it exists; if the index if out of bounds return nil .
|
GetAttachmentIndex | Retrieve the index of a specific attachment. |
Declaration int GetAttachmentIndex( const Object *attachment ) Parameters
attachment : Attachment object to retrieve.
Return Value
If the attachment exists, return its index; else return -1 .
|
AddConstraint | Add a new transformation constraint to the active bone. |
Declaration Constraint *AddConstraint( const char *name, const ConstraintType type ) Parameters
name : A name to identify the constraint.
type : The ConstraintType you want to create.
Return Value
The new Constraint.
|
GetConstraint | Get an existing Constraint using its name as key. |
Declaration Constraint *GetConstraint( const char *name ) Parameters
Return Value
If found the function will return the Constraint pointer; else will return nil .
|
GetConstraintAt | Get a transformation constraint at a specific index. |
Declaration Constraint *GetConstraintAt( unsigned char index ) Parameters
index : The index of the constraint you want to retrieve.
Return Value
If the index is not out of bounds return the Constraint; else nil .
|
GetConstraintIndex | Get an existing Constraint using its name as key. |
Declaration int GetConstraintIndex( const Constraint *constraint ) Parameters
Return Value
If the transformation constraint belongs to the active Bone return its index; else return -1 .
|
SetConstraintIndex | Change a constraint priority by changing its position in the list. |
Declaration bool SetConstraintIndex( Constraint *constraint, const unsigned char index ) Parameters
constraint : An existing constraint that is attached to the current Bone.
index : The new index in the list the constraint should be placed to.
Return Value
true if the operation is successfull; if the constraint is invalid or the index is out of bounds false .
|
RemoveConstraint | Delete an existing transformation Constraint. |
Declaration bool RemoveConstraint( Constraint *constraint ) Parameters
constraint : The constraint to remove.
Return Value
true on success else return false .
- Attention
- Passing a
nil value to the constraint parameter will remove all constraints.
|
RemoveConstraintAt | Change a constraint priority by changing its position in the list. |
Declaration bool RemoveConstraintAt( int index ) Parameters
index : The index of the constraint to remove.
Return Value
true if the operation is successfull; if the index is invalid false .
- Attention
- Passing a negative value (less than
0 ) as the index parameter will remove all constraints.
|
SwapConstraints | Exchange the priority of two existing constraint. |
Declaration bool SwapConstraints( unsigned char index0, unsigned char index1 ) Parameters
index0 : The index of the first constraint.
index1 : The index of the second constraint.
Return Value
true on success; if the indexes are the same or if one of them is invalid, return false .
|