Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtLodGrid Class Referenceabstract

#include <LodGrid.h>

Inheritance diagram for vtLodGrid:
vtGroup NodeExtension vtPagedStructureLodGrid vtSimpleLodGrid

Public Member Functions

virtual void Setup (const FPoint3 &origin, const FPoint3 &size, int iDimension, float fLODDistance, vtHeightField3d *pHF=NULL)=0
 
bool AddToGrid (osg::Node *pNode)
 
void RemoveFromGrid (osg::Node *pNode)
 
virtual void SetDistance (float fLODDistance)=0
 
float GetDistance ()
 
int GetDimension ()
 
FPoint3 GetCellSize ()
 

Protected Member Functions

virtual osg::Group * FindCellParent (const FPoint3 &point)=0
 
virtual void AllocateCell (int a, int b)=0
 
virtual osg::Group * GetCell (int a, int b)=0
 
void DetermineCell (const FPoint3 &pos, int &a, int &b)
 

Protected Attributes

FPoint3 m_origin
 
FPoint3 m_size
 
FPoint3 m_step
 
int m_dim
 
float m_fLODDistance
 
vtHeightField3dm_pHeightField
 

Additional Inherited Members

- Public Attributes inherited from NodeExtension
osg::Node * m_pNode
 
bool m_bCastShadow
 

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.


The documentation for this class was generated from the following files: