|
|||||||||||
| 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
com.jme.scene.lod.AreaClodMesh
AreaClodMesh
originally ported from David Eberly's c++, modifications and
enhancements made from there.
This class is an automatically updating ClodMesh that updates records acording to how much
area the bounding volume takes up on the screen. Use it just like a normal ClodMesh, but allow
it to update itself.
| 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 | |
AreaClodMesh()
Empty Constructor to be used internally only. |
|
AreaClodMesh(java.lang.String name)
Creates a new AreaClodMesh with the given name. |
|
AreaClodMesh(java.lang.String name,
TriMesh data,
CollapseRecord[] records)
Creates a clod mesh that mimics the given TriMesh's geometry information. |
|
AreaClodMesh(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 is used during rendering to choose the correct target record for the AreaClodMesh acording to the information in the renderer. |
float |
getDistanceTolerance()
Returns the amount of distance the camera must move from the center of this AreaClodMesh's bounding volume before a collapse is initiated. |
float |
getTrisPerPixel()
Returns the currently set number of triangles per pixel this AreaClodMesh should fit on the screen. |
void |
setDistanceTolerance(float tolerance)
Sets the amount of distance the camera must move from the center of this AreaClodMesh's bounding volume before a collapse is initiated. |
void |
setTargetRecord(int target)
This function is ignored by AreaClodMesh because target records are updated automatically during draw. |
void |
setTrisPerPixel(float trisPerPixel)
Sets the number of triangles per pixel this AreaClodMesh should try to fit on the screen. |
| Methods inherited from class com.jme.scene.lod.ClodMesh |
create, draw, getRecordQuantity, getRecords, getTargetRecord, setRecords |
| 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 AreaClodMesh()
public AreaClodMesh(java.lang.String name)
name - The mesh's name.TriMesh.reconstruct(com.jme.math.Vector3f[], com.jme.math.Vector3f[], com.jme.renderer.ColorRGBA[], com.jme.math.Vector2f[], int[]),
ClodMesh.create(com.jme.scene.lod.CollapseRecord[])
public AreaClodMesh(java.lang.String name,
TriMesh data,
CollapseRecord[] records)
name - The name of this new mesh.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 AreaClodMesh(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 int chooseTargetRecord(Renderer r)
chooseTargetRecord in class ClodMeshr - The Renderer to use.
public void setTargetRecord(int target)
setTargetRecord in class ClodMeshtarget - Ignored.public float getTrisPerPixel()
public void setTrisPerPixel(float trisPerPixel)
trisPerPixel - The new value for Triangles per pixel.public float getDistanceTolerance()
public void setDistanceTolerance(float tolerance)
tolerance - The new distance tolerance.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||