![]() |
VR-Forces Development_Version 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 | setDrawMode (DtDrawMode) |
| Sets what is drawn. | |
| virtual void | setVantageTerrainEngine (DtVantageTerrainEngine *) |
| Sets the terrain engine. | |
| virtual void | drawDebugInfo (bool force=false) |
| 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 | pageInUnavailableData (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry) |
| Calls pageInData on trackers which return false for dataAvailable. | |
| 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 (DtTerrainIntersectIDType intersectId=0) |
| Returns true if any tracker can page out data. | |
| virtual unsigned int | pageOutData (const int priority, unsigned int numTrianglesToPageOut, DtTerrainIntersectIDType intersectId) |
| virtual DtTerrainIntersectIDType | findOldDataIntersectId (unsigned int *numTriangles=0) |
| Find the intersect id of the oldest data in all the trackers. | |
| virtual void | setIntersectDataLoadExpireTime (const double &expireTime) |
| virtual bool | printInfo () const |
Protected Attributes | |
| DtVantageTerrainEngine * | myTerrainEngine |
| DtPrintPagingInfoCommand * | myPrintInfoCommand |
| bool | myWorldPagedOut |
| This is true only when this tracker doesn't have enough information to tell if any areas are completely paged in. | |
| tbb::spin_mutex | myDirtyFlagMutex |
| Set when anything drawable changes so we know to redraw. | |
| bool | myDirtyFlag |
| std::auto_ptr < DtSharedMemoryBulletDebugDrawer > | myPagingDebugDrawer |
| Drawer to use for drawDebugInfo call. | |
| std::auto_ptr < DtSharedMemoryBulletDebugDrawer > | myIntersectDebugDrawer |
| Drawer to use for intersections. | |
| 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.
|
private |
Not implemented.
| DtActivePageTracker::DtActivePageTracker | ( | ) |
Default constructor.
|
virtual |
Destructor.
|
private |
Not implemented.
|
virtual |
Sets what is drawn.
|
virtual |
Sets the terrain engine.
|
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 |
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 |
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 |
Calls pageInData on trackers which return false for dataAvailable.
|
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 |
// 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 |
|
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 |
Adds an intersect sphere to myIntersectSpheres for debug drawing purposes.
Will remove the oldest sphere if the list contains more than 100 spheres.
|
virtual |
Returns true if any tracker can page out data.
|
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 |
Find the intersect id of the oldest data in all the trackers.
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
This is true only when this tracker doesn't have enough information to tell if any areas are completely paged in.
|
mutableprotected |
Set when anything drawable changes so we know to redraw.
|
protected |
|
protected |
Drawer to use for drawDebugInfo call.
|
protected |
Drawer to use for intersections.
|
protected |
List of terrain source trackers that will determine whether all the necessary data is paged in for the intersection.
|
protected |
List of chords and spheres used for debug drawing purposes.
|
protected |
List of chords and spheres used for debug drawing purposes.
|
protected |
|
mutableprotected |