VR-Forces 4.1.1 Class Documentation
List of all members | Public Member Functions | Protected Attributes
DtTerrainSourcePager Class Reference

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

Inheritance diagram for DtTerrainSourcePager:
Inheritance graph
[legend]

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

DtTerrainSourcePager::DtTerrainSourcePager ( DtVantageTerrainEngine terrainEngine)

Constructor.

virtual DtTerrainSourcePager::~DtTerrainSourcePager ( )
virtual

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.

virtual DtTerrainSourceTracker* DtTerrainSourcePager::createTerrainSourceTracker ( )
pure virtual
virtual DtTerrainSourceTracker* DtTerrainSourcePager::terrainSourceTracker ( )
virtual

Accessor for myTerrainSourceTracker.

virtual void DtTerrainSourcePager::updatePageTracker ( const unsigned int  intersectId = 0)
pure virtual
virtual int DtTerrainSourcePager::highestPriorityPendingWork ( )
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
mutableprotected
DtVantageTerrainEngine* DtTerrainSourcePager::myTerrainEngine
protected

Pointer to the terrain implementation's terrain engine.

This class does not own the terrain engine.

DtTerrainSourceTracker* DtTerrainSourcePager::myTerrainSourceTracker
protected

The terrain source tracker that is updated by this pager.

double DtTerrainSourcePager::myCurrentTime
protected

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.

DtPagerCommandQueue DtTerrainSourcePager::myCommandQueue
protected

Thread-safe queue to put commands on.

DtCommandPriorityMultimap DtTerrainSourcePager::myPriorityCommandMultimap
protected

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 Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)