|
|||||||||||
| 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
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.
| Field Summary |
| Fields inherited from class com.jme.scene.TriMesh |
indices, triangleQuantity |
| Fields inherited from class com.jme.scene.Geometry |
bound, color, colorBuf, normal, normBuf, texBuf, texture, vertBuf, vertex, vertQuantity |
| Fields inherited from class com.jme.scene.Spatial |
currentStates, defaultStateList, forceCull, forceView, frustrumIntersects, geometricalControllers, lightCombineMode, localRotation, localScale, localTranslation, name, 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,
TriMesh data,
CollapseRecord[] records)
Creates a ClodMesh that is a duplicate of the given TriMesh's geometric information. |
|
ClodMesh(java.lang.String name,
Vector3f[] vertices,
Vector3f[] normal,
ColorRGBA[] color,
Vector2f[] texture,
int[] indices,
CollapseRecord[] records)
Creates a clod mesh with the given 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 |
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. |
| Methods inherited from class com.jme.scene.TriMesh |
clearBuffers, drawBounds, findCollisions, findTriangleCollision, findTrianglePick, findWorldRotMat, getIndexAsBuffer, getIndices, getMeshAsTriangles, getTriangle, getTriangle, getTriangleQuantity, hasCollision, hasTriangleCollision, putClone, reconstruct, setIndexBuffer, setIndices, updateCollisionTree, updateIndexBuffer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ClodMesh()
public ClodMesh(java.lang.String name)
name - The name of the ClodMesh.TriMesh.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,
Vector3f[] vertices,
Vector3f[] normal,
ColorRGBA[] color,
Vector2f[] texture,
int[] 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.texture - 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.ClodCreatorpublic void draw(Renderer r)
draw in class TriMeshr - The renderer to draw this TriMesh with.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.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||