Armature
@Deprecated public final class Skeleton extends java.lang.Object implements Savable, JmeCloneable
Skeleton
is a convenience class for managing a bone hierarchy.
Skeleton updates the world transforms to reflect the current local
animated matrixes.Modifier | Constructor and Description |
---|---|
protected |
Skeleton()
Deprecated.
Serialization only.
|
|
Skeleton(Bone[] boneList)
Deprecated.
Creates a skeleton from a bone list.
|
|
Skeleton(Skeleton source)
Deprecated.
Special-purpose copy constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
cloneFields(Cloner cloner,
java.lang.Object original)
Deprecated.
Implemented to perform deep cloning for this object, resolving
local cloned references using the specified cloner.
|
Matrix4f[] |
computeSkinningMatrices()
Deprecated.
Compute the skinning matrices for each bone of the skeleton that would be used to transform vertices of associated meshes
|
Bone |
getBone(int index)
Deprecated.
return a bone for the given index
|
Bone |
getBone(java.lang.String name)
Deprecated.
returns the bone with the given name
|
int |
getBoneCount()
Deprecated.
returns the number of bones of this skeleton
|
int |
getBoneIndex(Bone bone)
Deprecated.
returns the bone index of the given bone
|
int |
getBoneIndex(java.lang.String name)
Deprecated.
returns the bone index of the bone that has the given name
|
Bone[] |
getRoots()
Deprecated.
returns the array of all root bones of this skeleton
|
java.lang.Object |
jmeClone()
Deprecated.
Performs a regular shallow clone of the object.
|
void |
read(JmeImporter im)
Deprecated.
|
void |
reset()
Deprecated.
Reset the skeleton to bind pose.
|
void |
resetAndUpdate()
Deprecated.
Reset the skeleton to bind pose and updates the bones
|
void |
setBindingPose()
Deprecated.
Saves the current skeleton state as its binding pose.
|
java.lang.String |
toString()
Deprecated.
|
void |
updateWorldVectors()
Deprecated.
Updates world transforms for all bones in this skeleton.
|
void |
write(JmeExporter ex)
Deprecated.
|
public Skeleton(Bone[] boneList)
Note that using this constructor will cause the bones in the list to have their bind pose recomputed based on their local transforms.
boneList
- The list of bones to manage by this Skeletonpublic Skeleton(Skeleton source)
Shallow copies bind pose data from the source skeleton, does not copy any other data.
source
- The source Skeleton to copy fromprotected Skeleton()
public java.lang.Object jmeClone()
JmeCloneable
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.
jmeClone
in interface JmeCloneable
public void cloneFields(Cloner cloner, java.lang.Object original)
JmeCloneable
Note: during normal clone operations the original object will not be needed as the clone has already had all of the fields shallow copied.
cloneFields
in interface JmeCloneable
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.public void updateWorldVectors()
public void setBindingPose()
public final void reset()
public final void resetAndUpdate()
public Bone[] getRoots()
public Bone getBone(int index)
index
- the (zero-based) bone index (≥0)public Bone getBone(java.lang.String name)
name
- the name to search forpublic int getBoneIndex(Bone bone)
bone
- the Bone to search for (unaffected)public int getBoneIndex(java.lang.String name)
name
- the name to search forpublic Matrix4f[] computeSkinningMatrices()
public int getBoneCount()
public java.lang.String toString()
toString
in class java.lang.Object
public void read(JmeImporter im) throws java.io.IOException
public void write(JmeExporter ex) throws java.io.IOException