VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
trpgPageManager::LodPageInfo Class Reference

Public Member Functions

 LodPageInfo (void)
 
virtual ~LodPageInfo (void)
 
virtual bool Init (trpgr_Archive *, int myLod, double scale, int freeListDivider=1)
 
virtual bool SetLocation (trpg2dPoint &)
 
virtual trpgManagedTileGetNextLoad (void)
 
virtual void AckLoad ()
 
virtual trpgManagedTileGetNextUnload (void)
 
virtual void AckUnload (void)
 
virtual bool Stop (void)
 
virtual void Print (trpgPrintBuffer &)
 
const trpg2iPointGetLodSize () const
 
int GetLod () const
 
double GetPageDistance () const
 
const trpg2dPointGetCellSize () const
 
const trpg2iPointGetAreaOfInterest () const
 
const trpg2iPointGetCellPagingLocation () const
 

Protected Member Functions

virtual void Clean (void)
 
virtual void Update (void)
 
bool AddToLoadList (int x, int y, const trpgwAppAddress &addr)
 
void AddChildrenToLoadList (std::vector< trpgManagedTile * > &parentList)
 
bool isWithin (trpgManagedTile *, trpg2iPoint &sw, trpg2iPoint &ne)
 
void GetLoadedTileWithin (double pagingDistance, std::vector< trpgManagedTile * > &tileList)
 

Protected Attributes

bool valid
 
int lod
 
double pageDist
 
int maxNumTiles
 
trpg2dPoint cellSize
 
trpg2iPoint lodSize
 
trpg2iPoint aoiSize
 
trpg2iPoint cell
 
std::deque< trpgManagedTile * > load
 
std::deque< trpgManagedTile * > unload
 
std::deque< trpgManagedTile * > current
 
std::vector< booltmpCurrent
 
bool activeLoad
 
bool activeUnload
 
std::deque< trpgManagedTile * > freeList
 
int majorVersion
 
int minorVersion
 
const trpgTileTabletileTable
 

Friends

class trpgPageManager
 

Constructor & Destructor Documentation

trpgPageManager::LodPageInfo::LodPageInfo ( void  )
virtual trpgPageManager::LodPageInfo::~LodPageInfo ( void  )
virtual

Member Function Documentation

virtual bool trpgPageManager::LodPageInfo::Init ( trpgr_Archive ,
int  myLod,
double  scale,
int  freeListDivider = 1 
)
virtual
virtual bool trpgPageManager::LodPageInfo::SetLocation ( trpg2dPoint )
virtual
virtual trpgManagedTile* trpgPageManager::LodPageInfo::GetNextLoad ( void  )
virtual

Return the next tile to load for this terrain lod.

virtual void trpgPageManager::LodPageInfo::AckLoad ( )
virtual

Acknowledge the load. Move the active tile to the loaded list.

virtual trpgManagedTile* trpgPageManager::LodPageInfo::GetNextUnload ( void  )
virtual

Get the lsit of.

Return the next tile to unload for this terrain lod

virtual void trpgPageManager::LodPageInfo::AckUnload ( void  )
virtual

Acknowledge the unload. Move the active tile to the free list.

virtual bool trpgPageManager::LodPageInfo::Stop ( void  )
virtual

Called to stop paging. Everything active is dumped on the unload list.

virtual void trpgPageManager::LodPageInfo::Print ( trpgPrintBuffer )
virtual

Print current status and content information.

const trpg2iPoint& trpgPageManager::LodPageInfo::GetLodSize ( ) const
inline
int trpgPageManager::LodPageInfo::GetLod ( ) const
inline
double trpgPageManager::LodPageInfo::GetPageDistance ( ) const
inline
const trpg2dPoint& trpgPageManager::LodPageInfo::GetCellSize ( ) const
inline
const trpg2iPoint& trpgPageManager::LodPageInfo::GetAreaOfInterest ( ) const
inline

The unit are cellSize.

const trpg2iPoint& trpgPageManager::LodPageInfo::GetCellPagingLocation ( ) const
inline

The middle of this cell correspond to our paging location.

virtual void trpgPageManager::LodPageInfo::Clean ( void  )
protectedvirtual
virtual void trpgPageManager::LodPageInfo::Update ( void  )
protectedvirtual
bool trpgPageManager::LodPageInfo::AddToLoadList ( int  x,
int  y,
const trpgwAppAddress addr 
)
protected

Add to the load list the given tile if it is within the proper bound.

void trpgPageManager::LodPageInfo::AddChildrenToLoadList ( std::vector< trpgManagedTile * > &  parentList)
protected

Add the children of the given parent list to the load list if it it not already loaded or if it is not already in the list.

bool trpgPageManager::LodPageInfo::isWithin ( trpgManagedTile ,
trpg2iPoint sw,
trpg2iPoint ne 
)
protected

Check if the given tile is within the area we care about.

void trpgPageManager::LodPageInfo::GetLoadedTileWithin ( double  pagingDistance,
std::vector< trpgManagedTile * > &  tileList 
)
protected

Get the list of currently loaded tiles that fall within the region calculated from the given paging distance.

Friends And Related Function Documentation

friend class trpgPageManager
friend

Member Data Documentation

bool trpgPageManager::LodPageInfo::valid
protected
int trpgPageManager::LodPageInfo::lod
protected

Terrain LOD we're responsible for.

double trpgPageManager::LodPageInfo::pageDist
protected
int trpgPageManager::LodPageInfo::maxNumTiles
protected
trpg2dPoint trpgPageManager::LodPageInfo::cellSize
protected

Size of a single cell. Copied from the archive.

trpg2iPoint trpgPageManager::LodPageInfo::lodSize
protected

Number of tiles (cells) in each direction.

trpg2iPoint trpgPageManager::LodPageInfo::aoiSize
protected
trpg2iPoint trpgPageManager::LodPageInfo::cell
protected
std::deque<trpgManagedTile *> trpgPageManager::LodPageInfo::load
protected

List of tiles to load.

std::deque<trpgManagedTile *> trpgPageManager::LodPageInfo::unload
protected

List of tiles to unload.

std::deque<trpgManagedTile *> trpgPageManager::LodPageInfo::current
protected

List of currently loaded tiles.

std::vector<bool> trpgPageManager::LodPageInfo::tmpCurrent
protected

Used by Update. Here because we want to avoid memory allocs, if possible.

bool trpgPageManager::LodPageInfo::activeLoad
protected

Set if a load is in progress Load w/o ACK.

bool trpgPageManager::LodPageInfo::activeUnload
protected

Set if an unload is in progress Unload w/o ACK.

std::deque<trpgManagedTile *> trpgPageManager::LodPageInfo::freeList
protected

List of tile pointers we can reuse.

int trpgPageManager::LodPageInfo::majorVersion
protected

TerraPage version.

int trpgPageManager::LodPageInfo::minorVersion
protected
const trpgTileTable* trpgPageManager::LodPageInfo::tileTable
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)