com.md5importer.interfaces.model
Interface IMD5Node

All Superinterfaces:
com.jme.util.export.Savable
All Known Implementing Classes:
MD5Node

public interface IMD5Node
extends com.jme.util.export.Savable

IMD5Node defines the interface of a completed loaded MD5 model node. It can be maintained by other MD5 nodes as their dependent child, which will force the dependent child to follow the joints of its parent.


Method Summary
 void attachChild(IMD5Node node, int jointIndex)
          Attach the given MD5 node to the joint with given index.
 void attachChild(IMD5Node node, java.lang.String jointID)
          Attach the given MD5 node to the joint with given ID.
 void attachDependent(IMD5Node node)
          Attach the given MD5 node as a dependent child which shares the skeleton with this node.
 IMD5Node clone()
          Clone this MD5 node.
 void detachChild(IMD5Node node)
          Detach the given child from this node.
 void detachDependent(IMD5Node node)
          Detach the given dependent child.
 java.lang.Iterable<IMD5Node> getDependents()
          Retrieve the dependent children.
 IJoint getJoint(int index)
          Retrieve the joint with given index.
 IJoint[] getJoints()
          Retrieve the skeleton of this MD5 node.
 IMesh getMesh(int index)
          Retrieve the mesh with given index.
 IMesh[] getMeshes()
          Retrieve all the meshes maintained by this node.
 java.lang.String getName()
          Retrieve the name of the node.
 IJoint getRootJoint()
          Retrieve the root joint.
 void initialize()
          Initialize the IMD5Node.
 boolean isDependent()
          Check if this MD5 node is a dependent child of some other node.
 void swapBuffers()
          Swap vertex information buffers of all meshes and dependent children.
 void updateMeshes()
          Signal all the meshes to update based on skeleton including meshes maintained by dependent children.
 
Methods inherited from interface com.jme.util.export.Savable
getClassTag, read, write
 

Method Detail

initialize

void initialize()
Initialize the IMD5Node.


updateMeshes

void updateMeshes()
Signal all the meshes to update based on skeleton including meshes maintained by dependent children.

For performance and scalability issues, this method should be invoked outside the rendering thread.

This method is internally invoked by the node controller unit. User should not need to directly invoke this method.


swapBuffers

void swapBuffers()
Swap vertex information buffers of all meshes and dependent children.

In order for the updated meshes to be rendered properly, this method should be invoked within the rendering thread in a single rendering cycle.

This method should be invoked by the user application. There is no internal invocation.


attachChild

void attachChild(IMD5Node node,
                 java.lang.String jointID)
Attach the given MD5 node to the joint with given ID.

Parameters:
node - The IMD5Node needs to be attached.
jointID - The String ID of the joint.

attachChild

void attachChild(IMD5Node node,
                 int jointIndex)
Attach the given MD5 node to the joint with given index.

Parameters:
node - The IMD5Node needs to be attached.
jointIndex - The Integer index of the joint.

attachDependent

void attachDependent(IMD5Node node)
Attach the given MD5 node as a dependent child which shares the skeleton with this node.

Parameters:
node - The dependent IMD5Node needs to be attached.

detachChild

void detachChild(IMD5Node node)
Detach the given child from this node.

Parameters:
node - The IMD5Node instance.

detachDependent

void detachDependent(IMD5Node node)
Detach the given dependent child.

Parameters:
node - The IMD5Node instance.

getName

java.lang.String getName()
Retrieve the name of the node.

Returns:
The String name.

getJoints

IJoint[] getJoints()
Retrieve the skeleton of this MD5 node.

Returns:
The array of IJoint.

getJoint

IJoint getJoint(int index)
Retrieve the joint with given index.

Parameters:
index - The Integer index number.
Returns:
The IJoint instance.

getRootJoint

IJoint getRootJoint()
Retrieve the root joint.

Returns:
The root IJoint instance.

getMesh

IMesh getMesh(int index)
Retrieve the mesh with given index.

Parameters:
index - The Integer index number.
Returns:
The IMesh instance.

getMeshes

IMesh[] getMeshes()
Retrieve all the meshes maintained by this node.

Returns:
The array of IMesh instances.

getDependents

java.lang.Iterable<IMD5Node> getDependents()
Retrieve the dependent children.

Returns:
The Iterable of IMD5Node.

isDependent

boolean isDependent()
Check if this MD5 node is a dependent child of some other node.

Returns:
True if this MD5 node is dependent. False otherwise.

clone

IMD5Node clone()
Clone this MD5 node.

Returns:
The cloned IMD5Node instance.