Space Engineers
|
Bones in this model are represented by this class, which allows a bone to have more detail associatd with it. More...
Public Member Functions | |
MyCharacterBone (string name, MyCharacterBone parent, Matrix bindTransform, int index, Matrix[] relativeStorage, Matrix[] absoluteStorage) | |
Constructor for a bone object More... | |
void | ComputeAbsoluteTransform (bool propagateTransformToChildren=true) |
Compute the absolute transformation for this bone. More... | |
bool | ComputeBoneTransform () |
void | SetCompleteTransform (ref Vector3 translation, ref Quaternion rotation, float weight) |
This sets the rotation and translation such that the rotation times the translation times the bind after set equals this matrix. This is used to set animation values. More... | |
void | SetCompleteBindTransform () |
This sets the rotation and translation of the rest pose. More... | |
void | SetCompleteTransform (ref Vector3 translation, ref Quaternion rotation) |
This sets the rotation and translation such that the rotation times the translation times the bind after set equals this matrix. This is used to set animation values. More... | |
void | SetCompleteTransformFromAbsoluteMatrix (ref Matrix absoluteMatrix, bool onlyRotation) |
Set the rotation and translation of the bone from absolute transform. Does not recompute hierarchy - call ComputeAbsoluteTransform. More... | |
void | SetCompleteTransformFromAbsoluteMatrix (Matrix absoluteMatrix, bool onlyRotation) |
Set the rotation and translation of the bone from absolute transform. Does not recompute hierarchy - call ComputeAbsoluteTransform. More... | |
void | SetCompleteRotation (ref Quaternion rotation) |
This adds the rotation and translation to the one that is already set inside. More... | |
void | GetCompleteTransform (ref Vector3 translation, ref Quaternion rotation, out Vector3 completeTranslation, out Quaternion completeRotation) |
Same as SetCompleteTransform, but result is not stored internally, it is returned instead. More... | |
Matrix | GetAbsoluteRigTransform () |
Returns bone's rig absolute transform - including transforms of all parent bones More... | |
MyCharacterBone | GetChildBone (int childIndex) |
override string | ToString () |
Static Public Member Functions | |
static void | ComputeAbsoluteTransforms (MyCharacterBone[] bones) |
Compute absolute bone transforms for whole hierarchy. Expects the array to be sorted by depth in hiearachy. More... | |
static void | TranslateAllBones (MyCharacterBone[] characterBones, Vector3 translationModelSpace) |
Translate all bones. Translation vector is given in model space. We expect that absolute transforms are already computed. More... | |
Public Attributes | |
string | Name = "" |
The bone name More... | |
Properties | |
int | Index [get] |
Matrix | BindTransform [get] |
The bone bind transform More... | |
Matrix | BindTransformInv [get] |
Matrix | SkinTransform [get, set] |
Inverse of absolute bind transform for skinnning More... | |
Quaternion | Rotation [get, set] |
Bone rotation More... | |
Vector3 | Translation [get, set] |
Any translations More... | |
MyCharacterBone | Parent [get] |
The parent bone or null for the root bone More... | |
Matrix | AbsoluteTransform [get] |
The bone absolute transform More... | |
Matrix | RelativeTransform [get] |
The bone absolute transform More... | |
int | Depth [get] |
Bones in this model are represented by this class, which allows a bone to have more detail associatd with it.
This class allows you to manipulate the local coordinate system for objects by changing the scaling, translation, and rotation. These are indepenent of the bind transformation originally supplied for the model. So, the actual transformation for a bone is the product of the:
Scaling Bind scaling (scaling removed from the bind transform) Rotation Translation Bind Transformation Parent Absolute Transformation
Definition at line 25 of file MyCharacterBone.cs.
|
inline |
Constructor for a bone object
name | The name of the bone |
bindTransform | The initial bind transform for the bone |
parent | A parent for this bone |
index | Index of this bone in storage arrays. |
relativeStorage | reference to matrix array storing all relative transforms of the skeleton |
absoluteStorage | reference to matrix array storing all absolute transforms of the skeleton |
Definition at line 154 of file MyCharacterBone.cs.
|
inline |
Compute the absolute transformation for this bone.
Definition at line 248 of file MyCharacterBone.cs.
|
inlinestatic |
Compute absolute bone transforms for whole hierarchy. Expects the array to be sorted by depth in hiearachy.
Definition at line 202 of file MyCharacterBone.cs.
|
inline |
Definition at line 272 of file MyCharacterBone.cs.
|
inline |
Returns bone's rig absolute transform - including transforms of all parent bones
Definition at line 417 of file MyCharacterBone.cs.
|
inline |
Definition at line 434 of file MyCharacterBone.cs.
|
inline |
Same as SetCompleteTransform, but result is not stored internally, it is returned instead.
Definition at line 381 of file MyCharacterBone.cs.
|
inline |
This sets the rotation and translation of the rest pose.
Definition at line 319 of file MyCharacterBone.cs.
|
inline |
This adds the rotation and translation to the one that is already set inside.
Definition at line 372 of file MyCharacterBone.cs.
|
inline |
This sets the rotation and translation such that the rotation times the translation times the bind after set equals this matrix. This is used to set animation values.
Definition at line 303 of file MyCharacterBone.cs.
|
inline |
This sets the rotation and translation such that the rotation times the translation times the bind after set equals this matrix. This is used to set animation values.
Definition at line 332 of file MyCharacterBone.cs.
|
inline |
Set the rotation and translation of the bone from absolute transform. Does not recompute hierarchy - call ComputeAbsoluteTransform.
absoluteMatrix | absolute transform |
onlyRotation | apply only rotation |
Definition at line 344 of file MyCharacterBone.cs.
|
inline |
Set the rotation and translation of the bone from absolute transform. Does not recompute hierarchy - call ComputeAbsoluteTransform.
absoluteMatrix | absolute transform |
onlyRotation | apply only rotation |
Definition at line 364 of file MyCharacterBone.cs.
|
inline |
Definition at line 441 of file MyCharacterBone.cs.
|
inlinestatic |
Translate all bones. Translation vector is given in model space. We expect that absolute transforms are already computed.
Definition at line 228 of file MyCharacterBone.cs.
string VRageRender.Animations.MyCharacterBone.Name = "" |
The bone name
Definition at line 67 of file MyCharacterBone.cs.
|
get |
The bone absolute transform
Definition at line 104 of file MyCharacterBone.cs.
|
get |
The bone bind transform
Definition at line 77 of file MyCharacterBone.cs.
|
get |
Definition at line 78 of file MyCharacterBone.cs.
|
get |
Definition at line 136 of file MyCharacterBone.cs.
|
get |
Definition at line 69 of file MyCharacterBone.cs.
|
get |
The parent bone or null for the root bone
Definition at line 98 of file MyCharacterBone.cs.
|
get |
The bone absolute transform
Definition at line 112 of file MyCharacterBone.cs.
|
getset |
Bone rotation
Definition at line 88 of file MyCharacterBone.cs.
|
getset |
Inverse of absolute bind transform for skinnning
Definition at line 83 of file MyCharacterBone.cs.
|
getset |
Any translations
Definition at line 93 of file MyCharacterBone.cs.