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

#include <PagedLodGrid.h>

Inheritance diagram for vtPagedStructureLodGrid:
vtLodGrid vtGroup NodeExtension

Public Member Functions

void Setup (const FPoint3 &origin, const FPoint3 &size, int iDimension, float fLODDistance, vtHeightField3d *pHF=NULL)
 
void Cleanup ()
 
void SetDistance (float fLODDistance)
 
bool AppendToGrid (vtStructureArray3d *sa, int iIndex)
 
void RemoveFromGrid (vtStructureArray3d *sa, int iIndex)
 
vtPagedStructureLODGetPagedCell (int a, int b)
 
void DoPaging (const FPoint3 &CamPos, int iMaxStructures, float fDeleteDistance)
 
bool AddToQueue (vtPagedStructureLOD *pLOD, vtStructureArray3d *pArray, int iIndex)
 
bool RemoveFromQueue (vtStructureArray3d *pArray, int iIndex)
 
uint GetQueueSize ()
 
void SortQueue ()
 
void ClearQueue (vtStructureArray3d *pArray)
 
void RefreshPaging (vtStructureArray3d *pArray)
 
void EnableLoading (bool b)
 
int GetLoadCount ()
 
void ResetLoadCount ()
 
int GetTotalConstructed ()
 
vtPagedStructureLODFindGroup (vtStructure *str)
 
void ConstructByIndex (vtPagedStructureLOD *pLOD, vtStructureArray3d *pArray, uint iStructIndex)
 
- Public Member Functions inherited from vtLodGrid
bool AddToGrid (osg::Node *pNode)
 
void RemoveFromGrid (osg::Node *pNode)
 
float GetDistance ()
 
int GetDimension ()
 
FPoint3 GetCellSize ()
 

Public Attributes

bool m_LoadingEnabled
 

Protected Member Functions

void CullFarawayStructures (const FPoint3 &CamPos, int iMaxStructures, float fDistance)
 
void DeconstructCell (vtPagedStructureLOD *pLOD)
 
void RemoveCellFromQueue (vtPagedStructureLOD *pLOD)
 
osg::Group * FindCellParent (const FPoint3 &point)
 
vtPagedStructureLODFindPagedCellParent (const FPoint3 &point)
 
void AllocateCell (int a, int b)
 
osg::Group * GetCell (int a, int b)
 
- Protected Member Functions inherited from vtLodGrid
void DetermineCell (const FPoint3 &pos, int &a, int &b)
 

Protected Attributes

vtPagedStructureLOD ** m_pCells
 
int m_iLoadCount
 
int m_iTotalConstructed
 
QueueVector m_Queue
 
- Protected Attributes inherited from vtLodGrid
FPoint3 m_origin
 
FPoint3 m_size
 
FPoint3 m_step
 
int m_dim
 
float m_fLODDistance
 
vtHeightField3dm_pHeightField
 

Detailed Description

vtPagedStructureLodGrid provides a more complex implementation of vtLodGrid.

Like vtSimpleLodGrid, it consists of a 2D grid of LOD nodes, each covering a rectangular cell, which causes that cell's children to only be shown when within a given distance. Additionally, the cells can contain structures (vtStructure) which are not constructed until the cell is visible.

Member Function Documentation

vtPagedStructureLOD * vtPagedStructureLodGrid::FindGroup ( vtStructure str)

For a given vtStructure, find the lod group parent for it, using the structure's earth extents.

void vtPagedStructureLodGrid::RefreshPaging ( vtStructureArray3d pArray)

In case the paging grid did not load some structure before (because the structures were hidden), tell it to check again. You should call this when a structure layer becomes enabled (un-hidden).


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