|
||||||||||
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
public class 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.
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 |
---|
Fields inherited from class com.jme.scene.lod.ClodMesh |
---|
currentRecord, records, 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 | |
---|---|
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,
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. |
|
AreaClodMesh(java.lang.String name,
TriMesh data,
CollapseRecord[] records)
Creates a clod mesh that mimics the given TriMesh's geometry 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 |
read(JMEImporter e)
|
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. |
void |
write(JMEExporter e)
|
Methods inherited from class com.jme.scene.lod.ClodMesh |
---|
create, draw, getRecordQuantity, getRecords, getTargetRecord, setRecords |
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 |
Constructor Detail |
---|
public AreaClodMesh()
public AreaClodMesh(java.lang.String name)
name
- The mesh's name.#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, 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 int chooseTargetRecord(Renderer r)
chooseTargetRecord
in class ClodMesh
r
- The Renderer to use.
public void setTargetRecord(int target)
setTargetRecord
in class ClodMesh
target
- 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.public void write(JMEExporter e) throws java.io.IOException
write
in interface Savable
write
in class ClodMesh
java.io.IOException
public void read(JMEImporter e) throws java.io.IOException
read
in interface Savable
read
in class ClodMesh
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |