SMTerrain Class Reference
[Dynamic Terrain (CLOD)]

Inheritance diagram for SMTerrain:

Inheritance graph
[legend]
List of all members.

Detailed Description

The SMTerrain class implements Seumas McNally's algorithm for regular-grid terrain LOD. It was implemented directly from correspondence from the dearly missed Seumas, and is highly similar to the implementation in his game Treadmarks.
This implementation requires that the input heightfield is a square regular grid of dimension 2^n+1, e.g.. 1025, 2049, or 4097. Storage requirements are around 3-5 bytes/vertex. The data is represented in memory by a regular grid of height values, an implicit binary tree of variance values, and an explicit binary tree of visible faces.
This is the fastest and most memory-efficient algorithm currently known for terrain rendering with a long viewing distance and an unconstrained viewpoint.

Usage

  1. Create a new SMTerrain object
  2. Initialize it with a LocalGrid to provide height values
  3. add it to your scene graph
  4. set the desired level detail with SetPolygonTarget()
  5. for a detail texture, call SetDetailMaterial()
  6. let the scene graph API render the terrain for you each frame

    Performance Issues


Public Member Functions

DTErr Init (const vtElevationGrid *pGrid, float fZScale)
 initialization


Generated on Tue Apr 22 10:11:06 2008 for vtlib library by  doxygen 1.4.5