|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jme.scene.Spatial
com.jme.scene.Node
com.md5importer.model.MD5Node
public class MD5Node
MD5Node is the final product of MD5 loading process.
ModelNode maintains the loaded IJoint
and IMesh instances and update them accordingly.
MD5Node provides the cloning functionality so that
users can fast clone model nodes that may be used by multiple
entities. The newly cloned MD5Node is already
initialized and ready to be used.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.jme.scene.Spatial |
|---|
com.jme.scene.Spatial.CullHint, com.jme.scene.Spatial.LightCombineMode, com.jme.scene.Spatial.NormalsMode, com.jme.scene.Spatial.TextureCombineMode |
| Field Summary |
|---|
| Fields inherited from class com.jme.scene.Node |
|---|
children |
| Fields inherited from class com.jme.scene.Spatial |
|---|
cullHint, frustrumIntersects, geometricalControllers, isCollidable, lightCombineMode, localRotation, localScale, localTranslation, LOCKED_BOUNDS, LOCKED_BRANCH, LOCKED_MESH_DATA, LOCKED_NONE, LOCKED_SHADOWS, LOCKED_TRANSFORMS, lockedMode, name, normalsMode, parent, queueDistance, renderQueueMode, renderStateList, textureCombineMode, worldBound, worldRotation, worldScale, worldTranslation, zOrder |
| Constructor Summary | |
|---|---|
MD5Node()
Constructor of MD5Node. |
|
MD5Node(java.lang.String name,
IJoint[] joints,
IMesh[] meshes)
Constructor of MD5Node. |
|
| 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. |
boolean |
equals(java.lang.Object object)
|
java.lang.Class |
getClassTag()
|
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. |
IJoint |
getRootJoint()
Retrieve the root joint. |
int |
hashCode()
|
void |
initialize()
Initialize the IMD5Node. |
boolean |
isDependent()
Check if this MD5 node is a dependent child of some other node. |
void |
read(com.jme.util.export.JMEImporter im)
|
protected void |
setDependent(boolean dependent,
IMD5Node parent)
Set this MD5 node as a dependent child of another MD5 node. |
void |
swapBuffers()
Swap vertex information buffers of all meshes and dependent children. |
java.lang.String |
toString()
|
void |
updateMeshes()
Signal all the meshes to update based on skeleton including meshes maintained by dependent children. |
void |
write(com.jme.util.export.JMEExporter ex)
|
| Methods inherited from class com.jme.scene.Node |
|---|
applyRenderState, attachChild, attachChildAt, childChange, detachAllChildren, detachChild, detachChildAt, detachChildNamed, draw, findCollisions, findPick, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, hasCollision, lockBounds, lockMeshes, lockShadows, lockTransforms, setModelBound, sortLights, swapChildren, unlockBounds, unlockMeshes, unlockShadows, unlockTransforms, updateModelBound, updateWorldBound, updateWorldData, updateWorldVectors |
| Methods inherited from class com.jme.scene.Spatial |
|---|
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getController, getControllerCount, getControllers, getCullHint, getLastFrustumIntersection, getLightCombineMode, getLocalCullHint, getLocalLightCombineMode, getLocalNormalsMode, getLocalRenderQueueMode, getLocalRotation, getLocalScale, getLocalTextureCombineMode, getLocalToWorldMatrix, getLocalTranslation, getLocks, getName, getNormalsMode, getParent, getRenderQueueMode, getRenderState, getRenderState, getTextureCombineMode, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTranslation, getZOrder, hasAncestor, isCollidable, localToWorld, lock, lock, lockBranch, lockMeshes, lookAt, onDraw, propagateBoundToRoot, propagateStatesFromRoot, removeController, removeController, removeFromParent, removeUserData, rotateUpTo, setCullHint, setIsCollidable, setLastFrustumIntersection, setLightCombineMode, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalTranslation, setLocalTranslation, setLocks, setLocks, setName, setNormalsMode, setParent, setRenderQueueMode, setRenderState, setTextureCombineMode, setUserData, setZOrder, setZOrder, unlock, unlock, unlockBranch, unlockMeshes, updateGeometricState, updateRenderState, updateRenderState, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, worldToLocal |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.md5importer.interfaces.model.IMD5Node |
|---|
getName |
| Constructor Detail |
|---|
public MD5Node()
MD5Node.
public MD5Node(java.lang.String name,
IJoint[] joints,
IMesh[] meshes)
MD5Node.
name - The String name.| Method Detail |
|---|
public void initialize()
IMD5NodeIMD5Node.
initialize in interface IMD5Nodepublic void updateMeshes()
IMD5NodeFor 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.
updateMeshes in interface IMD5Nodepublic void swapBuffers()
IMD5NodeIn 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.
swapBuffers in interface IMD5Node
public void attachChild(IMD5Node node,
java.lang.String jointID)
IMD5Node
attachChild in interface IMD5Nodenode - The IMD5Node needs to be attached.jointID - The String ID of the joint.
public void attachChild(IMD5Node node,
int jointIndex)
IMD5Node
attachChild in interface IMD5Nodenode - The IMD5Node needs to be attached.jointIndex - The Integer index of the joint.public void attachDependent(IMD5Node node)
IMD5Node
attachDependent in interface IMD5Nodenode - The dependent IMD5Node needs to be attached.public void detachChild(IMD5Node node)
IMD5Node
detachChild in interface IMD5Nodenode - The IMD5Node instance.public void detachDependent(IMD5Node node)
IMD5Node
detachDependent in interface IMD5Nodenode - The IMD5Node instance.
protected void setDependent(boolean dependent,
IMD5Node parent)
dependent - True if this mesh should be set as dependent.parent - The IMD5Node parent.public IJoint[] getJoints()
IMD5Node
getJoints in interface IMD5NodeIJoint.public IJoint getJoint(int index)
IMD5Node
getJoint in interface IMD5Nodeindex - The Integer index number.
IJoint instance.public IJoint getRootJoint()
IMD5Node
getRootJoint in interface IMD5NodeIJoint instance.public IMesh getMesh(int index)
IMD5Node
getMesh in interface IMD5Nodeindex - The Integer index number.
IMesh instance.public IMesh[] getMeshes()
IMD5Node
getMeshes in interface IMD5NodeIMesh instances.public java.lang.Class getClassTag()
getClassTag in interface com.jme.util.export.SavablegetClassTag in class com.jme.scene.Spatialpublic java.lang.Iterable<IMD5Node> getDependents()
IMD5Node
getDependents in interface IMD5NodeIterable of IMD5Node.public boolean isDependent()
IMD5Node
isDependent in interface IMD5Node
public void write(com.jme.util.export.JMEExporter ex)
throws java.io.IOException
write in interface com.jme.util.export.Savablewrite in class com.jme.scene.Nodejava.io.IOException
public void read(com.jme.util.export.JMEImporter im)
throws java.io.IOException
read in interface com.jme.util.export.Savableread in class com.jme.scene.Nodejava.io.IOExceptionpublic java.lang.String toString()
toString in class com.jme.scene.Spatialpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic IMD5Node clone()
IMD5Node
clone in interface IMD5Nodeclone in class java.lang.ObjectIMD5Node instance.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||