VR-Forces 4.2 Class Documentation
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtPagedLodTerrainSourcePager Class Reference

A DtPagedLodTerrainSourcePager pages in data from a specific terrain patch. More...

Inheritance diagram for DtPagedLodTerrainSourcePager:
Inheritance graph
[legend]

Classes

class  DtActivePageVisitor
 Visitor class used to find the active paged of a OSG scene graph. More...

Public Member Functions

 DtPagedLodTerrainSourcePager (DtVantageTerrainEngine *terrainEngine, osg::Group *rootNode, const DtFilename &surfaceCharacterMap)
virtual ~DtPagedLodTerrainSourcePager ()
virtual DtTerrainSourceTrackercreateTerrainSourceTracker ()
 Creates and returns a DtOsgTerrainSourceTracker.
virtual bool pageInGeometry (const DtTerrainPagingGeometryPtr geometry, const unsigned int intersectId=0)
 This function must page in all the geometry specified by the argument, and return true when successful.
virtual bool pageOutNodes (std::list< DtNodeId > &nodesToRemove)
 This function must cause the page out of the nodeIds specified.
virtual void updateTerrain (const unsigned int intersectId=0)
virtual void updatePageTracker (const unsigned int intersectId=0)
 Updates the DtOsgTerrainSourceTracker.
- Public Member Functions inherited from DtBoundingVolumeTerrainSourcePager
 DtBoundingVolumeTerrainSourcePager (DtVantageTerrainEngine *terrainEngine)
virtual ~DtBoundingVolumeTerrainSourcePager ()
- Public Member Functions inherited from DtTerrainSourcePager
 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 DtTerrainSourceTrackerterrainSourceTracker ()
 Accessor for myTerrainSourceTracker.
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.

Static Public Member Functions

static DtTerrainSourcePagerterrainChooserFunction (osg::Node &node, DtVantageTerrainEngine *terrainEngine, const DtFilename &surfaceCharacterMap)
 This is the function that is registered with the DtTerrainSourceChooser.

Protected Member Functions

osg::Node * terrainRoot ()
 The root node that this pager is operating on.
virtual bool pageInData (DtPageInVisitor &visitor)

Static Protected Member Functions

static DtNodeId osgNodeId (osg::Node *node)
 Methods for converting to/from DtNodeId.
static osg::Node * nodeFromId (DtNodeId nodeId)
 Methods for converting to/from DtNodeId.

Protected Attributes

osg::Node * myRootNode
 The node on which this pager operates.
bool myForceUpdate
 Used to force update terrain when data has been paged out.
DtFilename mySurfaceCharacterMap

Detailed Description

A DtPagedLodTerrainSourcePager pages in data from a specific terrain patch.

DtPagedLodTerrainSourcePager is a derived terrainSourcePager that handles a source such as paged ive.

Constructor & Destructor Documentation

DtPagedLodTerrainSourcePager::DtPagedLodTerrainSourcePager ( DtVantageTerrainEngine terrainEngine,
osg::Group *  rootNode,
const DtFilename &  surfaceCharacterMap 
)
virtual DtPagedLodTerrainSourcePager::~DtPagedLodTerrainSourcePager ( )
virtual

Member Function Documentation

virtual DtTerrainSourceTracker* DtPagedLodTerrainSourcePager::createTerrainSourceTracker ( )
virtual

Creates and returns a DtOsgTerrainSourceTracker.

Implements DtTerrainSourcePager.

virtual bool DtPagedLodTerrainSourcePager::pageInGeometry ( const DtTerrainPagingGeometryPtr  geometry,
const unsigned int  intersectId = 0 
)
virtual

This function must page in all the geometry specified by the argument, and return true when successful.

If this method returns false, it will be called again later, until it returns true or times out.

Implements DtBoundingVolumeTerrainSourcePager.

virtual bool DtPagedLodTerrainSourcePager::pageOutNodes ( std::list< DtNodeId > &  nodesToRemove)
virtual

This function must cause the page out of the nodeIds specified.

It should return true when successful. It will be called repeatedly with the same arguments until it succeeds.

Implements DtBoundingVolumeTerrainSourcePager.

virtual void DtPagedLodTerrainSourcePager::updateTerrain ( const unsigned int  intersectId = 0)
virtual
virtual void DtPagedLodTerrainSourcePager::updatePageTracker ( const unsigned int  intersectId = 0)
virtual

Updates the DtOsgTerrainSourceTracker.

Implements DtBoundingVolumeTerrainSourcePager.

static DtTerrainSourcePager* DtPagedLodTerrainSourcePager::terrainChooserFunction ( osg::Node &  node,
DtVantageTerrainEngine terrainEngine,
const DtFilename &  surfaceCharacterMap 
)
static

This is the function that is registered with the DtTerrainSourceChooser.

If node is a pagedLOD node, then a DtPagedLodTerrainSourcePager is returned.

osg::Node* DtPagedLodTerrainSourcePager::terrainRoot ( )
protected

The root node that this pager is operating on.

virtual bool DtPagedLodTerrainSourcePager::pageInData ( DtPageInVisitor visitor)
protectedvirtual
static DtNodeId DtPagedLodTerrainSourcePager::osgNodeId ( osg::Node *  node)
staticprotected

Methods for converting to/from DtNodeId.

These are protected, because only the pager should be accessing NodeIds as if they are actual nodes. The tracker does not do that since it operates in a separate thread.

static osg::Node* DtPagedLodTerrainSourcePager::nodeFromId ( DtNodeId  nodeId)
staticprotected

Methods for converting to/from DtNodeId.

These are protected, because only the pager should be accessing NodeIds as if they are actual nodes. The tracker does not do that since it operates in a separate thread.

Member Data Documentation

osg::Node* DtPagedLodTerrainSourcePager::myRootNode
protected

The node on which this pager operates.

bool DtPagedLodTerrainSourcePager::myForceUpdate
protected

Used to force update terrain when data has been paged out.

DtFilename DtPagedLodTerrainSourcePager::mySurfaceCharacterMap
protected

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

Document ID: Generated on Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)