vtLodGrid Class Reference
[Scene Graph]

Inheritance diagram for vtLodGrid:

Inheritance graph
[legend]
List of all members.

Detailed Description

An LOD Grid is a useful way of grouping objects in your scene graph.

It implements a sparse 2D array of LOD nodes, which divide an area into a set of Cells. When objects (geometry, or other node types) are added to the LOD Grid, they are placed in the appropriate Cell. Each Cell has a distance at which the objects in that Cell are not drawn. This allows you to have a large number of objects in your scene, yet efficiently cull faraway objects. The distance can be accessed with SetDistance()/GetDistance().

The LOD Grid is particularly designed for terrain, since the Cell division is based on the horizontal (XZ) plane.

Since the LOD Grid is a specialized kind of vtGroup, you should call Release() on it rather than delete.


Public Member Functions

void Release ()=0
void RemoveNodeFromGrid (vtNode *pNode)


Member Function Documentation

void vtLodGrid::Release  )  [pure virtual]
 

Releases a node. Use this method instead of C++'s delete operator when you are done with a node. Internally, the node is reference counted so it is not deleted until all references to it are removed.

Reimplemented from vtGroup.

Implemented in vtSimpleLodGrid, and vtPagedStructureLodGrid.

void vtLodGrid::RemoveNodeFromGrid vtNode pNode  ) 
 

This version is slower than calling RemoveFromGrid, but it covers more situations. It searches through all of the LOD grid's cells looking for the node, so it will work even in cases where the object may have moved out of its original cell.


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