com.jmex.effects
Class TrailMesh
java.lang.Object
com.jme.scene.Spatial
com.jme.scene.Geometry
com.jme.scene.TriMesh
com.jmex.effects.TrailMesh
- All Implemented Interfaces:
- Savable, java.io.Serializable
public class TrailMesh
- extends TriMesh
- implements Savable
TrailMesh
- Author:
- Rikard Herlitz (MrCoder)
- 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 |
TrailMesh(java.lang.String name,
int nrTrailSections)
Creates a new TrailMesh. |
| 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, 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, setHasDirtyVertices, 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 |
TrailMesh
public TrailMesh(java.lang.String name,
int nrTrailSections)
- Creates a new TrailMesh.
- Parameters:
name - Name of SpatialnrTrailSections - Number of sections the TrailMesh should consist of. Number of
vertices in the mesh will be nrTrailSections * 2.
setTrailFront
public void setTrailFront(Vector3f position,
float width,
float tpf)
- Update the front position of the trail.
- Parameters:
position - New position of the trail frontwidth - Width of the trailtpf - Current time per frame
setTrailFront
public void setTrailFront(Vector3f position,
Vector3f tangent,
float width,
float tpf)
- Update the front position of the trail.
- Parameters:
position - New position of the trail fronttangent - Specifies the gradient of the trail (if facingmode is set to
tangent)width - Width of the trailtpf - Current time per frame
update
public void update(Vector3f camPos)
- Update the vertices of the trail.
- Parameters:
camPos - Camera position used for billboarding.
resetPosition
public void resetPosition(Vector3f position)
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 e)
throws java.io.IOException
- Specified by:
read in interface Savable- Overrides:
read in class TriMesh
- Throws:
java.io.IOException
setUpdateSpeed
public void setUpdateSpeed(float updateSpeed)
getUpdateSpeed
public float getUpdateSpeed()
setUpdateMode
public void setUpdateMode(TrailMesh.UpdateMode updateMode)
getUpdateMode
public TrailMesh.UpdateMode getUpdateMode()
setFacingMode
public void setFacingMode(TrailMesh.FacingMode facingMode)
getFacingMode
public TrailMesh.FacingMode getFacingMode()