com.jmex.model.ogrexml.anim
Class OgreMesh
java.lang.Object
com.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jmex.model.ogrexml.anim.OgreMesh
- All Implemented Interfaces:
- Savable, java.io.Serializable
public class OgreMesh
- extends TriMesh
Holds the bind pose, lod levels and a weightbuffer that defines vertex->bone/weight associations.
- See Also:
- Serialized Form
Fields inherited from class com.jme.scene.Geometry |
binormalBuf, bound, castsShadows, colorBuf, compVect, defaultColor, displayListID, enabled, fogBuf, hasDirtyVertices, normBuf, states, tangentBuf, texBuf, vboInfo, vertBuf, vertQuantity |
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 |
OgreMesh()
Instantiate an OgreMesh without name. |
OgreMesh(java.lang.String name)
|
Methods inherited from class com.jme.scene.TriMesh |
clearBuffers, draw, findCollisions, findTriangleCollision, findTrianglePick, getIndexBuffer, getMaxIndex, getMeshAsTriangles, getMeshAsTrianglesVertices, getMode, getTriangle, getTriangle, getTriangleCount, getTriangleIndices, getVertIndex, hasCollision, hasTriangleCollision, randomPointOnTriangles, recalcTriangleQuantity, reconstruct, setIndexBuffer, setMode, setTriangleQuantity |
Methods inherited from class com.jme.scene.Geometry |
addTextureCoordinates, addTextureCoordinates, applyRenderState, checkTextureCoordinates, clearTextureBuffers, copyTextureCoordinates, copyTextureCoordinates, findPick, getBinormalBuffer, getColorBuffer, getDefaultColor, getDisplayListID, getFogBuffer, getLightState, getModelBound, getNormalBuffer, getNumberOfUnits, getTangentBuffer, getTextureCoords, getTextureCoords, getVBOInfo, getVertexBuffer, getVertexCount, getWorldCoords, getWorldNormals, hasDirtyVertices, isCastsShadows, lockMeshes, postdraw, predraw, randomVertex, reconstruct, resizeTextureIds, rotateNormals, rotatePoints, scaleTextureCoordinates, scaleTextureCoordinates, setBinormalBuffer, setCastsShadows, setColorBuffer, setDefaultColor, setDisplayListID, setFogCoordBuffer, setLightState, setModelBound, setNormalBuffer, setRandomColors, setSolidColor, setTangentBuffer, setTextureCoords, setTextureCoords, setTextureCoords, setVBOInfo, setVertexBuffer, setVertexCount, sortLights, translatePoints, translatePoints, unlockMeshes, updateModelBound, updateWorldBound |
Methods inherited from class com.jme.scene.Spatial |
addController, calculateCollisions, calculatePick, clearControllers, clearRenderState, clearRenderState, getClassTag, 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, lockBounds, lockBranch, lockMeshes, lockShadows, lockTransforms, 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, toString, unlock, unlock, unlockBounds, unlockBranch, unlockMeshes, unlockShadows, unlockTransforms, updateGeometricState, updateRenderState, updateRenderState, updateWorldData, updateWorldRotation, updateWorldScale, updateWorldTranslation, updateWorldVectors, updateWorldVectors, worldToLocal |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
OgreMesh
public OgreMesh(java.lang.String name)
OgreMesh
public OgreMesh()
- Instantiate an OgreMesh without name. To be populated before use.
cloneFromMesh
public void cloneFromMesh(OgreMesh source)
setWeightBuffer
public void setWeightBuffer(WeightBuffer weightBuf)
getWeightBuffer
public WeightBuffer getWeightBuffer()
getVertexBufferOriginal
public java.nio.FloatBuffer getVertexBufferOriginal()
getNormalBufferOriginal
public java.nio.FloatBuffer getNormalBufferOriginal()
setLodLevels
public void setLodLevels(java.nio.IntBuffer[] lodLevels)
setLodLevel
public void setLodLevel(int level)
- Set the current LOD level.
LOD level zero is the model in max quality,
levels 1 and below reduce the quality/vertex count of the model
by a certain amount to increase rendering speed.
- Parameters:
level
-
setHasDirtyVertices
public void setHasDirtyVertices(boolean flag)
- Overrides:
setHasDirtyVertices
in class Geometry
getLodLevelCount
public int getLodLevelCount()
- Returns:
- Total number of lod levels
clearBindPose
public void clearBindPose()
- Clears all bind pose data
saveCurrentToBindPose
public void saveCurrentToBindPose()
- Saves the current mesh state to it's bind pose.
restoreBindPose
public void restoreBindPose()
- Restores bind pose
hasBindPose
public boolean hasBindPose()
- True if bind pose data is available
- Returns:
write
public void write(JMEExporter e)
throws java.io.IOException
- Specified by:
write
in interface Savable
- Overrides:
write
in class TriMesh
- Throws:
java.io.IOException
read
public void read(JMEImporter i)
throws java.io.IOException
- Specified by:
read
in interface Savable
- Overrides:
read
in class TriMesh
- Throws:
java.io.IOException