|
||||||||||
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.Geometry
com.jme.scene.TriMesh
com.jme.scene.lod.ClodMesh
public class ClodMesh
ClodMesh
originally ported from David Eberly's c++,
modifications and enhancements made from there.
This class is an extention of TriMesh that allows the option of rendering a
trimesh at various degrees of accuracy.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme.scene.TriMesh |
---|
TriMesh.Mode |
Nested classes/interfaces inherited from class com.jme.scene.Spatial |
---|
Spatial.CullHint, Spatial.LightCombineMode, Spatial.NormalsMode, Spatial.TextureCombineMode |
Field Summary | |
---|---|
(package private) int |
currentRecord
|
(package private) CollapseRecord[] |
records
|
(package private) int |
targetRecord
|
Fields inherited from class com.jme.scene.TriMesh |
---|
indexBuffer, mode, triangleQuantity |
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 | |
---|---|
ClodMesh()
Empty Constructor to be used internally only. |
|
ClodMesh(java.lang.String name)
Creates a new ClodMesh without any information. |
|
ClodMesh(java.lang.String name,
java.nio.FloatBuffer vertices,
java.nio.FloatBuffer normal,
java.nio.FloatBuffer color,
TexCoords coords,
java.nio.IntBuffer indices,
CollapseRecord[] records)
Creates a clod mesh with the given information. |
|
ClodMesh(java.lang.String name,
TriMesh data,
CollapseRecord[] records)
Creates a ClodMesh that is a duplicate of the given TriMesh's geometric information. |
Method Summary | |
---|---|
int |
chooseTargetRecord(Renderer r)
This function should not be called manually. |
void |
create(CollapseRecord[] records)
This function sets the records information for this ClodMesh. |
void |
draw(Renderer r)
Called during rendering. |
int |
getRecordQuantity()
Returns the number of records this ClodMesh currently uses. |
CollapseRecord[] |
getRecords()
Returns the current collapse records array. |
int |
getTargetRecord()
Returns the currently set target record. |
void |
read(JMEImporter e)
|
void |
setRecords(CollapseRecord[] records)
Sets the records this ClodMesh will use to collapse triangles. |
void |
setTargetRecord(int target)
Sets the current target record to the target value. |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.TriMesh |
---|
clearBuffers, 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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jme.util.export.Savable |
---|
getClassTag |
Field Detail |
---|
int currentRecord
int targetRecord
CollapseRecord[] records
Constructor Detail |
---|
public ClodMesh()
public ClodMesh(java.lang.String name)
name
- The name of the ClodMesh.#reconstruct(com.jme.math.Vector3f[], com.jme.math.Vector3f[],
com.jme.renderer.ColorRGBA[], com.jme.math.Vector2f[], int[])
,
create(com.jme.scene.lod.CollapseRecord[])
public ClodMesh(java.lang.String name, TriMesh data, CollapseRecord[] records)
name
- The name of the ClodMesh.data
- The TriMesh to copy information into for this mesh.records
- The collapse record(s) this ClodMesh should use. These modify
how the ClodMesh collapses vertexes.public ClodMesh(java.lang.String name, java.nio.FloatBuffer vertices, java.nio.FloatBuffer normal, java.nio.FloatBuffer color, TexCoords coords, java.nio.IntBuffer indices, CollapseRecord[] records)
name
- The name of the ClodMesh.vertices
- The vertex information of this clod mesh.normal
- The per vertex normal information of this clod mesh.color
- The per vertex color information of this clod mesh.coords
- The per vertex texture information of this clod mesh.indices
- The index array of this TriMesh's triangles.records
- The collapse record(s) this ClodMesh should use. These modify
how the ClodMesh collapses vertexes.Method Detail |
---|
public void create(CollapseRecord[] records)
records
- The records for this ClodMesh to use, or null if it should
generate its own.ClodCreator
public void draw(Renderer r)
draw
in class TriMesh
r
- The renderer to draw this TriMesh with.Spatial.draw(com.jme.renderer.Renderer)
public int getRecordQuantity()
public int chooseTargetRecord(Renderer r)
r
- A renderer which aids in choosing the correct target record.
public int getTargetRecord()
public CollapseRecord[] getRecords()
create(com.jme.scene.lod.CollapseRecord[])
public void setTargetRecord(int target)
target
- The new target record to use.public void setRecords(CollapseRecord[] records)
records
- The new records information of this ClodMesh.public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class TriMesh
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class TriMesh
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |