com.md5importer.model.mesh
Class Joint

java.lang.Object
  extended by com.md5importer.model.mesh.Joint
All Implemented Interfaces:
com.jme.util.export.Savable, IJoint, java.io.Serializable

public class Joint
extends java.lang.Object
implements java.io.Serializable, IJoint

Joint defines the concrete implementation of a joint in the skeleton system of a model.

Joint cannot be cloned directly. The cloning process of a Joint can only be initiated by the cloning process of the parent IModelNode.

This class is used internally by MD5Importer only.

See Also:
Serialized Form

Constructor Summary
Joint()
          Constructor of Joint.
Joint(int index, java.lang.String name, com.jme.math.Vector3f translation, com.jme.math.Vector3f orientation)
          Constructor of Joint.
 
Method Summary
 IJoint clone()
          Clone this join.
 java.lang.Class getClassTag()
           
 int getIndex()
          Retrieve the index value.
 java.lang.String getName()
          Retrieve the name ID of this joint.
 com.jme.math.Quaternion getOrientation()
          Retrieve the orientation of this joint read from MD5 file.
 IJoint getParent()
          Retrieve the parent joint.
 IJoint getSuperParent()
          Retrieve the super parent of this joint.
 com.jme.math.TransformMatrix getTransform()
          Retrieve the relative TransformMatrix of this Joint.
 com.jme.math.Vector3f getTranslation()
          Retrieve the translation of this joint read from MD5 file.
 void processRelative()
          Process the relative transforms of this joint.
 void processTransform()
          Process the translation and orientation of this joint This process has to be started from the bottom of skeleton tree up to the root joint.
 void read(com.jme.util.export.JMEImporter im)
           
 void setParent(IJoint parent)
          Set the parent joint of this one.
 void setSuperParent(IJoint superParent)
          Set the super parent of this joint in the parent model node.
 void updateTransform(com.jme.math.Vector3f translation, com.jme.math.Quaternion orientation)
          Update the translation and orientation of this joint.
 void write(com.jme.util.export.JMEExporter ex)
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Joint

public Joint()
Constructor of Joint.


Joint

public Joint(int index,
             java.lang.String name,
             com.jme.math.Vector3f translation,
             com.jme.math.Vector3f orientation)
Constructor of Joint.

Parameters:
index - The Integer index.
name - The String name ID.
translation - The Vector3f translation value.
orientation - The un-processed Vector3f orientation value.
Method Detail

updateTransform

public void updateTransform(com.jme.math.Vector3f translation,
                            com.jme.math.Quaternion orientation)
Description copied from interface: IJoint
Update the translation and orientation of this joint.

Specified by:
updateTransform in interface IJoint
Parameters:
translation - The new Vector3f translation value.
orientation - The new Quaternion orientation value.

processTransform

public void processTransform()
Description copied from interface: IJoint
Process the translation and orientation of this joint This process has to be started from the bottom of skeleton tree up to the root joint.

Specified by:
processTransform in interface IJoint

processRelative

public void processRelative()
Description copied from interface: IJoint
Process the relative transforms of this joint.

Specified by:
processRelative in interface IJoint

setParent

public void setParent(IJoint parent)
Description copied from interface: IJoint
Set the parent joint of this one.

Specified by:
setParent in interface IJoint
Parameters:
parent - The parent IJoint instance.

setSuperParent

public void setSuperParent(IJoint superParent)
Description copied from interface: IJoint
Set the super parent of this joint in the parent model node.

Specified by:
setSuperParent in interface IJoint
Parameters:
superParent - The super parent IJoint instance.

getTranslation

public com.jme.math.Vector3f getTranslation()
Description copied from interface: IJoint
Retrieve the translation of this joint read from MD5 file.

Specified by:
getTranslation in interface IJoint
Returns:
The Vector3f translation read directly from MD5 file.

getOrientation

public com.jme.math.Quaternion getOrientation()
Description copied from interface: IJoint
Retrieve the orientation of this joint read from MD5 file.

Specified by:
getOrientation in interface IJoint
Returns:
The Quaternion orientation read directly from MD5 file.

getTransform

public com.jme.math.TransformMatrix getTransform()
Description copied from interface: IJoint
Retrieve the relative TransformMatrix of this Joint.

Specified by:
getTransform in interface IJoint
Returns:
The relative TransformMatrix of this Joint.

getSuperParent

public IJoint getSuperParent()
Description copied from interface: IJoint
Retrieve the super parent of this joint.

Specified by:
getSuperParent in interface IJoint
Returns:
The super parent IJoint instance.

getParent

public IJoint getParent()
Description copied from interface: IJoint
Retrieve the parent joint.

Specified by:
getParent in interface IJoint
Returns:
The parent IJoint instance.

getName

public java.lang.String getName()
Description copied from interface: IJoint
Retrieve the name ID of this joint.

Specified by:
getName in interface IJoint
Returns:
The String name ID.

getIndex

public int getIndex()
Description copied from interface: IJoint
Retrieve the index value.

Specified by:
getIndex in interface IJoint
Returns:
The Integer index.

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface com.jme.util.export.Savable

write

public void write(com.jme.util.export.JMEExporter ex)
           throws java.io.IOException
Specified by:
write in interface com.jme.util.export.Savable
Throws:
java.io.IOException

read

public void read(com.jme.util.export.JMEImporter im)
          throws java.io.IOException
Specified by:
read in interface com.jme.util.export.Savable
Throws:
java.io.IOException

clone

public IJoint clone()
Description copied from interface: IJoint
Clone this join.

Specified by:
clone in interface IJoint
Overrides:
clone in class java.lang.Object
Returns:
The cloned copy of this IJoint