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

DtTerrainSourcePager is the base class for terrain pagers. More...

Inheritance diagram for DtTerrainSourcePager:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtTerrainSourcePager (DtVantageTerrainEngine *terrainEngine)
 Constructor.
virtual ~DtTerrainSourcePager ()
 Destructor. Deletes all pending commands and myTerrainSourceTracker.
virtual void tick ()
 Processes commands from the priority-sorted command map.
virtual DtTerrainSourceTrackercreateTerrainSourceTracker ()=0
 Creates and returns a DtTerrainSourceTracker.
virtual DtTerrainSourceTrackerterrainSourceTracker ()
 Accessor for myTerrainSourceTracker.
virtual void updatePageTracker (const unsigned int intersectId=0)=0
virtual int highestPriorityPendingWork ()
 Calls processCommandQueue to add new commands into the priority-sorted command map.
virtual void processCommandQueue ()
 Takes incoming commands off the command queue and adds them to the priority-sorted command map.
virtual void setCurrentTime (const double &currentTime)
 Sets myCurrentTime for purposes of expiring old page-in commands.

Protected Attributes

tbb::spin_rw_mutex myMutex
DtVantageTerrainEnginemyTerrainEngine
 Pointer to the terrain implementation's terrain engine.
DtTerrainSourceTrackermyTerrainSourceTracker
 The terrain source tracker that is updated by this pager.
double myCurrentTime
 Time to compare a command's expire time to before executing the command.
DtPagerCommandQueue myCommandQueue
 Thread-safe queue to put commands on.
DtCommandPriorityMultimap myPriorityCommandMultimap
 Multimap of priorities to paging commands.

Detailed Description

DtTerrainSourcePager is the base class for terrain pagers.

There will be one terrainSourcePager per terrain patch. They will each handle paging in terrain from an individual source, such as metaflight, paged .ive, or osgEarth streaming terrain.


Constructor & Destructor Documentation

Constructor.

Destructor. Deletes all pending commands and myTerrainSourceTracker.


Member Function Documentation

virtual void DtTerrainSourcePager::tick ( ) [virtual]

Processes commands from the priority-sorted command map.

Executes the first command and returns, or expires commands until it finds a command to execute.

Accessor for myTerrainSourceTracker.

virtual void DtTerrainSourcePager::updatePageTracker ( const unsigned int  intersectId = 0) [pure virtual]

Calls processCommandQueue to add new commands into the priority-sorted command map.

Then returns the priority of the highest-priority pending command.

virtual void DtTerrainSourcePager::processCommandQueue ( ) [virtual]

Takes incoming commands off the command queue and adds them to the priority-sorted command map.

virtual void DtTerrainSourcePager::setCurrentTime ( const double &  currentTime) [virtual]

Sets myCurrentTime for purposes of expiring old page-in commands.

The time passed in will only be used if it is greater than myCurrentTime.

Parameters:
Thenew time to use for expiring commands.

Member Data Documentation

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

Pointer to the terrain implementation's terrain engine.

This class does not own the terrain engine.

The terrain source tracker that is updated by this pager.

Time to compare a command's expire time to before executing the command.

If the command's expire time is less than the current time, the command will not be executed.

Thread-safe queue to put commands on.

Multimap of priorities to paging commands.

Commands are taken off the queue and put here until they are either executed or expired.


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)