![]() |
VR-Forces 4.0.4 Class Documentation
|
This class keeps track of what parts of the terrain database are currently paged in and what ones are not. More...
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. | |
| btIDebugDraw * | myDebugDrawer |
| 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< DtChord > | myIntersectChords |
| List of chords and spheres used for debug drawing purposes. | |
| std::list< DtSphere > | myIntersectSpheres |
| List of chords and spheres used for debug drawing purposes. | |
Private Member Functions | |
| DtActivePageTracker (const DtActivePageTracker &) | |
| Not implemented. | |
| DtActivePageTracker & | operator= (const DtActivePageTracker &) |
| Not implemented. | |
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.
| DtActivePageTracker::DtActivePageTracker | ( | const DtActivePageTracker & | ) | [private] |
Not implemented.
Default constructor.
| virtual DtActivePageTracker::~DtActivePageTracker | ( | ) | [virtual] |
Destructor.
| 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.
| intersectId | Optional intersectId to seed newly-paged in data with for removal priority. Also used to mark already paged-in data that this geometry would require. |
| metaData | Data about this page in request |
| geometry | The geometry to page in. |
| virtual bool DtActivePageTracker::dataAvailable | ( | DtPagingMetaDataPtr | metaData, |
| DtTerrainPagingGeometryPtr | geometry | ||
| ) | [virtual] |
Calls dataAvailableAlongChord on all available terrainSourceTrackers.
| metaData | Data about this page in request |
| geometry | Used 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] |
| priority | The priority of any commands generated by this call. |
| numTrianglesToPageOut | The 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] |
bool DtActivePageTracker::myWorldPagedOut [protected] |
This is true only when this tracker doesn't have enough information to tell if any areas are completely paged in.
btIDebugDraw* DtActivePageTracker::myDebugDrawer [protected] |
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.
std::list<DtChord> DtActivePageTracker::myIntersectChords [protected] |
List of chords and spheres used for debug drawing purposes.
std::list<DtSphere> DtActivePageTracker::myIntersectSpheres [protected] |
List of chords and spheres used for debug drawing purposes.
double DtActivePageTracker::myIntersectDataLoadExpireTime [protected] |
tbb::spin_rw_mutex DtActivePageTracker::myMutex [mutable, protected] |