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

public class ClipmapLevel extends Mesh
ClipmapLevel is the visual representation of one lod level of height data.
  • Field Details

    • VERT_SIZE

      public static final int VERT_SIZE
      Number 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 level
      clipmapTestFrustum - the clipmap test frustum
      clipSideSize - Number of vertices per clipside. Must be one less than power of two.
      heightScale - Maximum terrainheight and heightscale
      cache - the terrain cache
      Throws:
      Exception - exception
  • Method Details

    • updateCache

      public void updateCache()
    • updateVertices

      public void updateVertices()
      Update clipmap vertices
    • regenerate

      public void regenerate()
    • updateIndices

      public void updateIndices(ClipmapLevel nextFinerLevel)
      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

      public TerrainCache getCache()
    • setHeightRange

      public void setHeightRange(float heightRangeMin, float heightRangeMax)
    • getHeightRangeMax

      public float getHeightRangeMax()
    • getHeightRangeMin

      public float getHeightRangeMin()
    • getClipSideSize

      public int getClipSideSize()
    • getClipRegion

      public Region getClipRegion()
    • getIntersectionRegion

      public Region getIntersectionRegion()
    • getHeightScale

      public float getHeightScale()
    • isCullingEnabled

      public boolean isCullingEnabled()
    • setCullingEnabled

      public void setCullingEnabled(boolean cullingEnabled)
    • shutdown

      public void shutdown()