Class ClipmapLevel
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Mesh
com.ardor3d.extension.terrain.client.ClipmapLevel
- All Implemented Interfaces:
Pickable
,Hintable
,Renderable
,Savable
ClipmapLevel is the visual representation of one lod level of height data.
-
Field Summary
Fields inherited from class com.ardor3d.scenegraph.Mesh
_defaultColor, _isVisible, _lightState, _meshData, _modelBound, _states, RENDER_VERTEX_ONLY
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
ConstructorDescriptionClipmapLevel
(int levelIndex, Camera clipmapTestFrustum, int clipSideSize, float heightScale, TerrainCache cache) Creates a new clipmaplevel. -
Method Summary
Modifier and TypeMethodDescriptiongetCache()
int
float
float
float
int
Gets the number of triangles that are visible in the current frame.int
boolean
boolean
isReady()
void
void
setCullingEnabled
(boolean cullingEnabled) void
setHeightRange
(float heightRangeMin, float heightRangeMax) void
shutdown()
void
void
updateIndices
(ClipmapLevel nextFinerLevel) Updates the whole indexarray.void
Update clipmap verticesMethods inherited from class com.ardor3d.scenegraph.Mesh
applyWorldRenderStates, draw, getClassTag, getDefaultColor, getLightState, getMeshData, getModelBound, getModelBound, getWorldNormals, getWorldRenderState, getWorldVectors, intersectsPrimitivesWhere, intersectsWorldBound, intersectsWorldBoundsWhere, isVisible, makeCopy, makeInstanced, read, render, render, renderArrays, renderVBO, reorderIndices, reorderVertexData, reorderVertexData, setDefaultColor, setDefaultColor, setLightState, setMeshData, setModelBound, setModelBound, setRandomColors, setSolidColor, setVisible, sortLights, supportsBoundsIntersectionRecord, supportsPrimitivesIntersectionRecord, updateModelBound, updateWorldBound, write
Methods inherited from class com.ardor3d.scenegraph.Spatial
acceptVisitor, addController, addTranslation, addTranslation, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyDown, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateChildren, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, updateWorldRenderStates, updateWorldTransform, worldToLocal
-
Field Details
-
VERT_SIZE
public static final int VERT_SIZENumber of components for vertices- See Also:
-
-
Constructor Details
-
ClipmapLevel
public ClipmapLevel(int levelIndex, Camera clipmapTestFrustum, int clipSideSize, float heightScale, TerrainCache cache) throws Exception Creates a new clipmaplevel.- Parameters:
levelIndex
- Levelindex of the clipmap. If is 0 this will be the finest levelclipmapTestFrustum
- the clipmap test frustumclipSideSize
- Number of vertices per clipside. Must be one less than power of two.heightScale
- Maximum terrainheight and heightscalecache
- the terrain cache- Throws:
Exception
- exception
-
-
Method Details
-
updateCache
public void updateCache() -
updateVertices
public void updateVertices()Update clipmap vertices -
regenerate
public void regenerate() -
updateIndices
Updates the whole indexarray.- Parameters:
nextFinerLevel
- the next finer level
-
getStripIndex
public int getStripIndex()Gets the number of triangles that are visible in the current frame. This changes every frame.- Returns:
- the number of triangles visible in the current frame
-
getVertexDistance
public int getVertexDistance()- Returns:
- the vertexDistance
-
isReady
public boolean isReady() -
getCache
-
setHeightRange
public void setHeightRange(float heightRangeMin, float heightRangeMax) -
getHeightRangeMax
public float getHeightRangeMax() -
getHeightRangeMin
public float getHeightRangeMin() -
getClipSideSize
public int getClipSideSize() -
getClipRegion
-
getIntersectionRegion
-
getHeightScale
public float getHeightScale() -
isCullingEnabled
public boolean isCullingEnabled() -
setCullingEnabled
public void setCullingEnabled(boolean cullingEnabled) -
shutdown
public void shutdown()
-