vtlib library
List of all members
BruteTerrain Class Reference
Inheritance diagram for BruteTerrain:
Inheritance graph
[legend]

Additional Inherited Members

- Public Member Functions inherited from vtDynTerrainGeom
DTErr BasicInit (const vtElevationGrid *pGrid)
 
virtual void SetPolygonTarget (int iPolygonCount)
 
int GetPolygonTarget () const
 
int NumDrawnTriangles () const
 
- Public Member Functions inherited from vtDynGeom
int IsVisible (const FSphere &sphere) const
 
int IsVisible (const FPoint3 &point0, const FPoint3 &point1, const FPoint3 &point2, const float fTolerance=0.0f) const
 
int IsVisible (const FPoint3 &point, float radius) const
 
bool IsVisible (const FPoint3 &point) const
 
- Public Member Functions inherited from vtGeode
void AddMesh (vtMesh *pMesh, int iMatIdx)
 
void RemoveMesh (vtMesh *pMesh)
 
void RemoveAllMeshes ()
 
void AddTextMesh (vtTextMesh *pMesh, int iMatIdx, bool bOutline=true)
 
uint NumMeshes () const
 
vtMeshGetMesh (int i) const
 
vtTextMeshGetTextMesh (int i) const
 
- Public Member Functions inherited from NodeExtension
void SetEnabled (bool bOn)
 
bool GetEnabled () const
 
void SetCastShadow (bool b)
 Set this node to cast a shadow, if it is under a vtShadow node. Default is false.
 
bool GetCastShadow ()
 Get whether this node casts a shadow.
 
void GetBoundSphere (FSphere &sphere, bool bGlobal=false)
 Get the Bounding Sphere of the node.
 

Detailed Description

This class provides a simplistic example of how to add a terrain-rendering implementation to the vtlib library. It contains the bare skeleton of terrain rendering code, taking an elevation grid as input and doing a naive, brute-force rendering all the geometry via OpenGL each frame.

To add, or wrap, your own terrain rendering algorithm, simply make a copy of BruteTerrain and rename it, then fill in the methods with your own functionality.