Class Bone
- All Implemented Interfaces:
- Savable,- JmeCloneable,- Cloneable
Bone describes a bone in the bone-weight skeletal animation
 system. A bone contains a name and an index, as well as relevant
 transformation data.
 A bone has 3 sets of transforms :
 1. The bind transforms, that are the transforms of the bone when the skeleton
 is in its rest pose (also called bind pose or T pose in the literature).
 The bind transforms are expressed in Local space meaning relatively to the
 parent bone.
 2. The Local transforms, that are the transforms of the bone once animation
 or user transforms has been applied to the bind pose. The local transforms are
 expressed in Local space meaning relatively to the parent bone.
 3. The Model transforms, that are the transforms of the bone relatives to the
 rootBone of the skeleton. Those transforms are what is needed to apply skinning
 to the mesh the skeleton controls.
 Note that there can be several rootBones in a skeleton. The one considered for
 these transforms is the one that is an ancestor of this bone.- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidDeprecated.Add a new child to this bone.voidcloneFields(Cloner cloner, Object original) Deprecated.Implemented to perform deep cloning for this object, resolving local cloned references using the specified cloner.Deprecated.Deprecated.Returns the bind position expressed in local space (relative to the parent bone).Deprecated.Returns the bind rotation expressed in local space (relative to the parent bone).Deprecated.Returns the bind scale expressed in local space (relative to the parent bone).Deprecated.Returns all the children bones of this bone.getCombinedTransform(Vector3f position, Quaternion rotation) Deprecated.Returns the local transform of this bone combined with the given position and rotationDeprecated.Returns the local position of the bone, relative to the parent bone.Deprecated.Returns the local rotation of the bone, relative to the parent bone.Deprecated.Returns the local scale of the bone, relative to the parent bone.Deprecated.Returns the inverse Bind position of this bone expressed in model space.Deprecated.Returns the inverse bind rotation of this bone expressed in model space.Deprecated.Returns the inverse world bind pose scale.Deprecated.Deprecated.Returns the position of the bone in model space.Deprecated.Returns the rotation of the bone in model space.Deprecated.Returns the scale of the bone in model space.getName()Deprecated.Returns the name of the bone, set in the constructor.Deprecated.Returns parent bone of this bone, or null if it is a root bone.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.Deprecated.usegetBindScale()booleanDeprecated.returns true if this bone can be directly manipulated by the user.jmeClone()Deprecated.Performs a regular shallow clone of the object.voidread(JmeImporter im) Deprecated.voidsetBindTransforms(Vector3f translation, Quaternion rotation, Vector3f scale) Deprecated.Sets the local bind transform of the bone.voidDeprecated.Sets the rotation of the bone in object space.voidsetLocalScale(Vector3f scale) Deprecated.Sets the scale of the bone in object space.voidDeprecated.Sets the position of the bone in object space.voidsetUserControl(boolean enable) Deprecated.If enabled, user can control bone transform with setUserTransforms.voidsetUserTransforms(Vector3f translation, Quaternion rotation, Vector3f scale) Deprecated.Sets the transforms of this bone in local space (relative to the parent bone)voidsetUserTransformsInModelSpace(Vector3f translation, Quaternion rotation) Deprecated.Sets the transforms of this bone in model space (relative to the root bone) Must update all bones in skeleton for this to work.toString()Deprecated.final voidupdate()Deprecated.Updates world transforms for this bone and its children.final voidDeprecated.Updates the model transforms for this bone and, possibly, the attachments node if not null.final voidDeprecated.voidwrite(JmeExporter ex) Deprecated.
- 
Field Details- 
SAVABLE_VERSIONpublic static final int SAVABLE_VERSIONDeprecated.- See Also:
 
 
- 
- 
Constructor Details- 
BoneDeprecated.Creates a new bone with the given name.- Parameters:
- name- Name to give to this bone
 
- 
Boneprotected Bone()Deprecated.Serialization only. Do not use.
 
- 
- 
Method Details- 
jmeCloneDeprecated.Description copied from interface:JmeCloneablePerforms a regular shallow clone of the object. Some fields may also be cloned but generally only if they will never be shared with other objects. (For example, local Vector3fs and so on.)This method is separate from the regular clone() method so that objects might still maintain their own regular java clone() semantics (perhaps even using Cloner for those methods). However, because Java's clone() has specific features in the sense of Object's clone() implementation, it's usually best to have some path for subclasses to bypass the public clone() method that might be cloning fields and instead get at the superclass protected clone() methods. For example, through super.jmeClone() or another protected clone method that some base class eventually calls super.clone() in. - Specified by:
- jmeClonein interface- JmeCloneable
- Returns:
- a new instance
 
- 
cloneFieldsDeprecated.Description copied from interface:JmeCloneableImplemented to perform deep cloning for this object, resolving local cloned references using the specified cloner. The object can call cloner.clone(fieldValue) to deep clone any of its fields.Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied. - Specified by:
- cloneFieldsin interface- JmeCloneable
- Parameters:
- cloner- The cloner that is performing the cloning operation. The cloneFields method can call back into the cloner to make clones of its subordinate fields.
- original- The original object from which this object was cloned. This is provided for the very rare case that this object needs to refer to its original for some reason. In general, all of the relevant values should have been transferred during the shallow clone, and this object need only clone what it wants.
 
- 
getNameDeprecated.Returns the name of the bone, set in the constructor.- Returns:
- The name of the bone, set in the constructor.
 
- 
getParentDeprecated.Returns parent bone of this bone, or null if it is a root bone.- Returns:
- The parent bone of this bone, or null if it is a root bone.
 
- 
getChildrenDeprecated.Returns all the children bones of this bone.- Returns:
- All the children bones of this bone.
 
- 
getLocalPositionDeprecated.Returns the local position of the bone, relative to the parent bone.- Returns:
- The local position of the bone, relative to the parent bone.
 
- 
getLocalRotationDeprecated.Returns the local rotation of the bone, relative to the parent bone.- Returns:
- The local rotation of the bone, relative to the parent bone.
 
- 
getLocalScaleDeprecated.Returns the local scale of the bone, relative to the parent bone.- Returns:
- The local scale of the bone, relative to the parent bone.
 
- 
getModelSpacePositionDeprecated.Returns the position of the bone in model space.- Returns:
- The position of the bone in model space.
 
- 
getModelSpaceRotationDeprecated.Returns the rotation of the bone in model space.- Returns:
- The rotation of the bone in model space.
 
- 
getModelSpaceScaleDeprecated.Returns the scale of the bone in model space.- Returns:
- The scale of the bone in model space.
 
- 
getWorldBindInversePositionDeprecated.- Returns:
- the pre-existing vector
 
- 
getModelBindInversePositionDeprecated.Returns the inverse Bind position of this bone expressed in model space.The inverse bind pose transform of the bone in model space is its "default" transform with no animation applied. - Returns:
- the inverse bind position of this bone expressed in model space.
 
- 
getWorldBindInverseRotationDeprecated.- Returns:
- the pre-existing Quaternion
 
- 
getModelBindInverseRotationDeprecated.Returns the inverse bind rotation of this bone expressed in model space.The inverse bind pose transform of the bone in model space is its "default" transform with no animation applied. - Returns:
- the inverse bind rotation of this bone expressed in model space.
 
- 
getWorldBindInverseScaleDeprecated.- Returns:
- the pre-existing vector
 
- 
getModelBindInverseScaleDeprecated.Returns the inverse world bind pose scale.The inverse bind pose transform of the bone in model space is its "default" transform with no animation applied. - Returns:
- the inverse world bind pose scale.
 
- 
getModelBindInverseTransformDeprecated.
- 
getBindInverseTransformDeprecated.
- 
getWorldBindPositionDeprecated.- Returns:
- the pre-existing vector
 
- 
getBindPositionDeprecated.Returns the bind position expressed in local space (relative to the parent bone).The bind pose transform of the bone in local space is its "default" transform with no animation applied. - Returns:
- the bind position in local space.
 
- 
getWorldBindRotationDeprecated.- Returns:
- the pre-existing Quaternion
 
- 
getBindRotationDeprecated.Returns the bind rotation expressed in local space (relative to the parent bone).The bind pose transform of the bone in local space is its "default" transform with no animation applied. - Returns:
- the bind rotation in local space.
 
- 
getWorldBindScaleDeprecated.usegetBindScale()- Returns:
- the pre-existing vector
 
- 
getBindScaleDeprecated.Returns the bind scale expressed in local space (relative to the parent bone).The bind pose transform of the bone in local space is its "default" transform with no animation applied. - Returns:
- the bind scale in local space.
 
- 
setUserControlpublic void setUserControl(boolean enable) Deprecated.If enabled, user can control bone transform with setUserTransforms. Animation transforms are not applied to this bone when enabled.- Parameters:
- enable- true for direct control, false for canned animations
 
- 
addChildDeprecated.Add a new child to this bone. Shouldn't be used by user code. Can corrupt skeleton.- Parameters:
- bone- The bone to add
 
- 
updateWorldVectorsDeprecated.
- 
updateModelTransformspublic final void updateModelTransforms()Deprecated.Updates the model transforms for this bone and, possibly, the attachments node if not null.The model transform of this bone is computed by combining the parent's model transform with this bone's local transform. 
- 
updatepublic final void update()Deprecated.Updates world transforms for this bone and its children.
- 
setUserTransformsDeprecated.Sets the transforms of this bone in local space (relative to the parent bone)- Parameters:
- translation- the translation in local space
- rotation- the rotation in local space
- scale- the scale in local space
 
- 
setUserTransformsInModelSpaceDeprecated.Sets the transforms of this bone in model space (relative to the root bone) Must update all bones in skeleton for this to work.- Parameters:
- translation- translation in model space
- rotation- rotation in model space
 
- 
getCombinedTransformDeprecated.Returns the local transform of this bone combined with the given position and rotation- Parameters:
- position- a position
- rotation- a rotation
- Returns:
- the resulting Transform (in reusable temporary storage!)
 
- 
setBindTransformsDeprecated.Sets the local bind transform of the bone. Call setBindingPose() after all of the bones' bind transforms are set to save them.- Parameters:
- translation- the desired bind translation (not null, unaffected)
- rotation- the desired bind rotation (not null, unaffected)
- scale- the desired bind scale (unaffected) or null for no scaling
 
- 
toStringDeprecated.
- 
readDeprecated.- Specified by:
- readin interface- Savable
- Throws:
- IOException
 
- 
writeDeprecated.- Specified by:
- writein interface- Savable
- Throws:
- IOException
 
- 
setLocalRotationDeprecated.Sets the rotation of the bone in object space. Warning: you need to callsetUserControl(boolean)with true to be able to do that operation- Parameters:
- rot- the desired rotation (not null, unaffected)
 
- 
setLocalTranslationDeprecated.Sets the position of the bone in object space. Warning: you need to callsetUserControl(boolean)with true to be able to do that operation- Parameters:
- pos- the desired translation (not null, unaffected)
 
- 
setLocalScaleDeprecated.Sets the scale of the bone in object space. Warning: you need to callsetUserControl(boolean)with true to be able to do that operation- Parameters:
- scale- the scale to apply
 
- 
hasUserControlpublic boolean hasUserControl()Deprecated.returns true if this bone can be directly manipulated by the user.- Returns:
- true if it can be manipulated
- See Also:
 
 
- 
Joint