VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Attributes
DtActivePageTracker Class Reference

This class keeps track of what parts of the terrain database are currently paged in and what ones are not. More...

List of all members.

Public Member Functions

 DtActivePageTracker ()
 Default constructor.
virtual ~DtActivePageTracker ()
 Destructor.
virtual void setDebugDrawer (btIDebugDraw *drawer)
 Set debug drawer to be used by drawDebugInfo()
virtual void drawDebugInfo () const
 Calls drawDebugInfo on each tracker in myTerrainSourceTrackers.
virtual void setWorldPagedOut (bool v)
 Sets the worldPagedOut flag.
virtual void pageInData (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 Calls pageInData on each tracker in myTerrainSourceTrackers.
virtual bool dataAvailable (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 Calls dataAvailableAlongChord on all available terrainSourceTrackers.
virtual void addTerrainSourceTracker (DtTerrainSourceTracker *terrainSourceTracker)
 // Adds the filename to the list of known not found files.
virtual void removeTerrainSourceTracker (DtTerrainSourceTracker *terrainSourceTracker)
virtual void addIntersectChord (const DtChord &intersectChord)
 Adds an intersect chord to myIntersectChords for debug drawing purposes.
virtual void addIntersectSphere (const DtSphere &intersectSphere)
 Adds an intersect sphere to myIntersectSpheres for debug drawing purposes.
virtual bool canPageOutData (unsigned int intersectId=0)
 Returns true if any tracker can page out data.
virtual unsigned int pageOutData (const int priority, unsigned int numTrianglesToPageOut, unsigned int intersectId)
virtual void setIntersectDataLoadExpireTime (const double &expireTime)

Protected Attributes

bool myWorldPagedOut
 This is true only when this tracker doesn't have enough information to tell if any areas are completely paged in.
btIDebugDrawmyDebugDrawer
 Drawer to use for drawDebugInfo call.
DtTerrainSourceTrackerList myTerrainSourceTrackers
 List of terrain source trackers that will determine whether all the necessary data is paged in for the intersection.
double myIntersectDataLoadExpireTime
tbb::spin_rw_mutex myMutex
std::list< DtChordmyIntersectChords
 List of chords and spheres used for debug drawing purposes.
std::list< DtSpheremyIntersectSpheres
 List of chords and spheres used for debug drawing purposes.

Private Member Functions

 DtActivePageTracker (const DtActivePageTracker &)
 Not implemented.
DtActivePageTrackeroperator= (const DtActivePageTracker &)
 Not implemented.

Detailed Description

This class keeps track of what parts of the terrain database are currently paged in and what ones are not.

It is able to give very quick answers to queries about if all the data needed to satisfy a particular database request is loaded or not.


Constructor & Destructor Documentation

Not implemented.

Default constructor.

Destructor.


Member Function Documentation

DtActivePageTracker& DtActivePageTracker::operator= ( const DtActivePageTracker ) [private]

Not implemented.

virtual void DtActivePageTracker::setDebugDrawer ( btIDebugDraw drawer) [virtual]

Set debug drawer to be used by drawDebugInfo()

virtual void DtActivePageTracker::drawDebugInfo ( ) const [virtual]

Calls drawDebugInfo on each tracker in myTerrainSourceTrackers.

Also draws contents of myIntersectChords and myIntersectSpheres if the current drawMode contains DT_DRAW_INTERSECT_CHORDS.

virtual void DtActivePageTracker::setWorldPagedOut ( bool  v) [virtual]

Sets the worldPagedOut flag.

If this is true, this means that the paged out data is incomplete, and any part of the world may have paged out data in it.

virtual void DtActivePageTracker::pageInData ( DtPagingMetaDataPtr  metaData,
DtTerrainPagingGeometryPtr  geometry 
) [virtual]

Calls pageInData on each tracker in myTerrainSourceTrackers.

Once all data corresponding to this call is paged in, all the data necessary for the intersection call will be in the collision world.

Parameters:
intersectIdOptional intersectId to seed newly-paged in data with for removal priority. Also used to mark already paged-in data that this geometry would require.
metaDataData about this page in request
geometryThe geometry to page in.

Calls dataAvailableAlongChord on all available terrainSourceTrackers.

Returns:
True if all data along this chord has been paged in.
Parameters:
metaDataData about this page in request
geometryUsed to determine what terrain we're looking for.
virtual void DtActivePageTracker::addTerrainSourceTracker ( DtTerrainSourceTracker terrainSourceTracker) [virtual]

// Adds the filename to the list of known not found files.

// Updates the paged out areas to reflect the new status. virtual void addToFilesNotFound(std::string filename);

// Checks the filename against the known not found filenames. virtual bool fileNotFound(std::string filename) const; Add a terrain source tracker.

virtual void DtActivePageTracker::removeTerrainSourceTracker ( DtTerrainSourceTracker terrainSourceTracker) [virtual]
virtual void DtActivePageTracker::addIntersectChord ( const DtChord intersectChord) [virtual]

Adds an intersect chord to myIntersectChords for debug drawing purposes.

Will remove the oldest chord if the list contains more than 100 chords.

virtual void DtActivePageTracker::addIntersectSphere ( const DtSphere intersectSphere) [virtual]

Adds an intersect sphere to myIntersectSpheres for debug drawing purposes.

Will remove the oldest sphere if the list contains more than 100 spheres.

virtual bool DtActivePageTracker::canPageOutData ( unsigned int  intersectId = 0) [virtual]

Returns true if any tracker can page out data.

virtual unsigned int DtActivePageTracker::pageOutData ( const int  priority,
unsigned int  numTrianglesToPageOut,
unsigned int  intersectId 
) [virtual]
Returns:
The number of page-out commands generated by this function.
Parameters:
priorityThe priority of any commands generated by this call.
numTrianglesToPageOutThe number of triangles this function will attempt to page out, from last-used to most-recently-used.
virtual void DtActivePageTracker::setIntersectDataLoadExpireTime ( const double &  expireTime) [virtual]

Member Data Documentation

This is true only when this tracker doesn't have enough information to tell if any areas are completely paged in.

Drawer to use for drawDebugInfo call.

List of terrain source trackers that will determine whether all the necessary data is paged in for the intersection.

List of chords and spheres used for debug drawing purposes.

List of chords and spheres used for debug drawing purposes.

tbb::spin_rw_mutex DtActivePageTracker::myMutex [mutable, protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)