VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtOsgEarthTerrainSourceTracker Class Reference
Inheritance diagram for DtOsgEarthTerrainSourceTracker:
Inheritance graph
[legend]

Classes

class  TileSpatialIndex

Public Member Functions

 DtOsgEarthTerrainSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue, osgEarth::MapNode *mapNode)
virtual ~DtOsgEarthTerrainSourceTracker ()
virtual bool useRawElevation () const
 True if using elevation data (i.e. if using osgEarth REX engine).
virtual unsigned tileCount () const
 Number of currently paged in tiles.
virtual unsigned cellCount () const
 Number of cells in index.
virtual void addPagedInTile (const osgEarth::TileKey &tilekey, const boost::shared_ptr< DtTileData > &tileData)
 Adds a tileId and the corresponding tileData to #myPagedInTiles.
virtual void removePagedInTile (const osgEarth::TileKey tileKey)
 Removes a tileId and the corresponding tileData from #myPagedInTiles.
virtual bool dataAvailable (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 Finds all tiles within geometry, and tests to see whether they have all been paged in already.
virtual bool findHeightFieldIntersections (const DtChord &chord, DtVrfChordIntersectRecordList &intList, bool *dataAvailable=0) const
virtual void processTriangles (DtTriangleOutputInterface &output, const DtTerrainProcessPolygonsBox &box) const
virtual void pageInData (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 Page in data within geometry.
virtual DtTerrainIntersectIDType findOldestPagedData (unsigned int &numTrianglesOut)
 Finds the least-recently-used tile and set myOldestPagedObject to it.
virtual void pageOutOldestData (const int priority)
 Adds a page out command for the least-recently-used tileID to myCommandQueue.
virtual void drawDebugInfo (btIDebugDraw *debugDrawer)
 Draws the tile boundaries if we are drawing tile boundaries.
virtual void drawElevation ()
 Updates the shared memory drawer with current data.
virtual bool canPageOutData (DtTerrainIntersectIDType intersectId)
 Returns true if there is data that can be paged out.
virtual osgEarth::TileKey getBestTileKey (const osgEarth::TileKey &) const
 Returns a lower LOD tilekey if the one supplied is greater than the max data level.
virtual void findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const
 Find all the tiles that intersect the geometry which are not paged in.
virtual unsigned getMaxLOD () const
 Max lod that the tracker will generate.
virtual void setMaxLOD (unsigned)
virtual double triangleOutputMergeTolerance () const
 If the max difference between true elevation and elevation defined by the two triangles that make up this cell is less than this value then the system will use those two triangles instead of breaking them up further.
virtual void setTriangleOutputMergeTolerance (double tol)
virtual double intersetionTriangleMergeTolerance () const
virtual void setIntersectionTriangleMergeTolerance (double tol)
- Public Member Functions inherited from DtTerrainSourceTracker
 DtTerrainSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue)
virtual ~DtTerrainSourceTracker ()
virtual DtTerrainInterfaceConfigconfigOptions ()
virtual void addNodesToCollisionMapping (DtNodeId node, DtCollisionObjectList *collObjList)
virtual void removeNodeToCollisionMappings (DtNodeId node)
virtual DtCollisionObjectList collisionObjectsForNode (DtNodeId node)
virtual const Coordinate_SystemlocalCS () const
virtual void setLabel (const DtString &)
virtual void printInfo () const

Protected Types

typedef boost::ptr_vector
< TileSpatialIndex
TileRoots
typedef tbb::spin_mutex DrawerMutex

Protected Member Functions

virtual DtPageInTilesCommandcreatePageInTilesCommand (DtPagingMetaDataPtr metaData)
virtual DtPageOutTilesCommandcreatePageOutTilesCommand (DtPagingMetaDataPtr metaData)
virtual bool setDrawMode (DtDrawMode)
virtual void convertGeometry (const DtTerrainPagingGeometryPtr &geometry, std::vector< DtTerrainPagingGeometryPtr > &output) const
 Convert geometry to internal coordinate system.
virtual bool convertGeometry (const DtTerrainPagingChord &geometry, std::vector< DtTerrainPagingGeometryPtr > &output) const
virtual bool convertGeometry (const DtTerrainPagingSphere &geometry, std::vector< DtTerrainPagingGeometryPtr > &output) const
virtual bool convertGeometry (const DtTerrainPagingShape &geometry, std::vector< DtTerrainPagingGeometryPtr > &output) const
virtual bool nearCenterOfEarth (const DtChord &chord) const
virtual bool findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, const DtPagingMetaDataPtr &metaData=DtPagingMetaDataPtr()) const
virtual void findMissing (const DtTerrainPagingGeometry &geometry, DtTileKeyList &missing) const
virtual boost::shared_ptr
< DtTileData
findOldest () const
virtual boost::shared_ptr
< DtTileData
findOldestUnlocked () const

Protected Attributes

const osg::ref_ptr
< osgEarth::MapNode > 
myMapNode
std::vector< osg::ref_ptr
< osgEarth::ElevationLayer > > 
myElevationLayers
bool myUseRawElevation
unsigned int myMaxLOD
double myTriangleOutputMergeTolerance
double myIntersetionTriangleMergeTolerance
TileRoots myTileSpatialIndexRoots
double myWorldWidth
boost::weak_ptr< DtTileDatamyOldestData
DrawerMutex myDrawerMutex
std::auto_ptr
< DtSharedMemoryBulletDebugDrawer
myExtentDrawer
std::auto_ptr
< DtSharedMemoryBulletDebugDrawer
myElevationDrawer
- Protected Attributes inherited from DtTerrainSourceTracker
DtString myLabel
DtTerrainInterfaceConfig myConfig
DtPagerCommandQueuemyCommandQueue
DtNodeToCollObjMMap myNodeToCollObjMMap
tbb::spin_rw_mutex myMutex
DtVantageTerrainEnginemyVantageTerrainEngine

Member Typedef Documentation

typedef boost::ptr_vector<TileSpatialIndex> DtOsgEarthTerrainSourceTracker::TileRoots
protected
typedef tbb::spin_mutex DtOsgEarthTerrainSourceTracker::DrawerMutex
protected

Constructor & Destructor Documentation

DtOsgEarthTerrainSourceTracker::DtOsgEarthTerrainSourceTracker ( DtVantageTerrainEngine ,
DtPagerCommandQueue commandQueue,
osgEarth::MapNode *  mapNode 
)
virtual DtOsgEarthTerrainSourceTracker::~DtOsgEarthTerrainSourceTracker ( )
virtual

Member Function Documentation

virtual bool DtOsgEarthTerrainSourceTracker::useRawElevation ( ) const
virtual

True if using elevation data (i.e. if using osgEarth REX engine).

virtual unsigned DtOsgEarthTerrainSourceTracker::getMaxLOD ( ) const
virtual

Max lod that the tracker will generate.

virtual void DtOsgEarthTerrainSourceTracker::setMaxLOD ( unsigned  )
virtual
virtual double DtOsgEarthTerrainSourceTracker::triangleOutputMergeTolerance ( ) const
virtual

If the max difference between true elevation and elevation defined by the two triangles that make up this cell is less than this value then the system will use those two triangles instead of breaking them up further.

Intersection is for terrain intersections. Triangle output is for triangle generation.

virtual void DtOsgEarthTerrainSourceTracker::setTriangleOutputMergeTolerance ( double  tol)
virtual
virtual double DtOsgEarthTerrainSourceTracker::intersetionTriangleMergeTolerance ( ) const
virtual
virtual void DtOsgEarthTerrainSourceTracker::setIntersectionTriangleMergeTolerance ( double  tol)
virtual
virtual unsigned DtOsgEarthTerrainSourceTracker::tileCount ( ) const
virtual

Number of currently paged in tiles.

virtual unsigned DtOsgEarthTerrainSourceTracker::cellCount ( ) const
virtual

Number of cells in index.

virtual void DtOsgEarthTerrainSourceTracker::addPagedInTile ( const osgEarth::TileKey &  tilekey,
const boost::shared_ptr< DtTileData > &  tileData 
)
virtual

Adds a tileId and the corresponding tileData to #myPagedInTiles.

Parameters
tileIdKey for the tileData passed in.
tileDatatileData to create the tileId -> tileData mapping with.
virtual void DtOsgEarthTerrainSourceTracker::removePagedInTile ( const osgEarth::TileKey  tileKey)
virtual

Removes a tileId and the corresponding tileData from #myPagedInTiles.

virtual bool DtOsgEarthTerrainSourceTracker::dataAvailable ( DtPagingMetaDataPtr  metaData,
DtTerrainPagingGeometryPtr  geometry 
)
virtual

Finds all tiles within geometry, and tests to see whether they have all been paged in already.

Tiles within the geometry that have been paged in have their "lastUsed" data set to the intersectId parameter for removal priority.

Parameters
geometryThe geometry to test for data available.
intersectIdOptional parameter to mark already-paged-in tiles with.
Returns
True if all data within this geometry has been paged in.

Implements DtTerrainSourceTracker.

virtual bool DtOsgEarthTerrainSourceTracker::findHeightFieldIntersections ( const DtChord chord,
DtVrfChordIntersectRecordList intList,
bool dataAvailable = 0 
) const
virtual
virtual void DtOsgEarthTerrainSourceTracker::processTriangles ( DtTriangleOutputInterface output,
const DtTerrainProcessPolygonsBox box 
) const
virtual
virtual void DtOsgEarthTerrainSourceTracker::pageInData ( DtPagingMetaDataPtr  metaData,
DtTerrainPagingGeometryPtr  geometry 
)
virtual

Page in data within geometry.

Determines which tiles are within the geometry and adds a page in command to myCommandQueue to page in any tiles within the geometry that have not yet been paged in.

Parameters
geometryThe geometry to page in data within.
intersectIdId to assign to the page in command to seed tileData for newly paged-in tiles.
priorityPriority to use for commands generated by this call.

Implements DtTerrainSourceTracker.

virtual DtTerrainIntersectIDType DtOsgEarthTerrainSourceTracker::findOldestPagedData ( unsigned int numTrianglesOut)
virtual

Finds the least-recently-used tile and set myOldestPagedObject to it.

Parameters
numTrianglesOutThe number of triangles the least-recently-used tileId represents in the collision world.
Returns
The id of the last intersect test for which this tracker's least-recently-used data was necessary.

Implements DtTerrainSourceTracker.

virtual void DtOsgEarthTerrainSourceTracker::pageOutOldestData ( const int  priority)
virtual

Adds a page out command for the least-recently-used tileID to myCommandQueue.

Parameters
priorityPriority to use for commands generated by this call.

Implements DtTerrainSourceTracker.

virtual void DtOsgEarthTerrainSourceTracker::drawDebugInfo ( btIDebugDraw debugDrawer)
virtual

Draws the tile boundaries if we are drawing tile boundaries.

Implements DtTerrainSourceTracker.

virtual void DtOsgEarthTerrainSourceTracker::drawElevation ( )
virtual

Updates the shared memory drawer with current data.

virtual bool DtOsgEarthTerrainSourceTracker::canPageOutData ( DtTerrainIntersectIDType  intersectId)
virtual

Returns true if there is data that can be paged out.

Implements DtTerrainSourceTracker.

virtual osgEarth::TileKey DtOsgEarthTerrainSourceTracker::getBestTileKey ( const osgEarth::TileKey &  ) const
virtual

Returns a lower LOD tilekey if the one supplied is greater than the max data level.

Otherwise returns to input tilekey.

virtual void DtOsgEarthTerrainSourceTracker::findMissingTiles ( const DtTerrainPagingGeometryPtr geometry,
DtTileKeyList tiles 
) const
virtual

Find all the tiles that intersect the geometry which are not paged in.

virtual DtPageInTilesCommand* DtOsgEarthTerrainSourceTracker::createPageInTilesCommand ( DtPagingMetaDataPtr  metaData)
protectedvirtual
virtual DtPageOutTilesCommand* DtOsgEarthTerrainSourceTracker::createPageOutTilesCommand ( DtPagingMetaDataPtr  metaData)
protectedvirtual
virtual bool DtOsgEarthTerrainSourceTracker::setDrawMode ( DtDrawMode  )
protectedvirtual

Reimplemented from DtTerrainSourceTracker.

virtual void DtOsgEarthTerrainSourceTracker::convertGeometry ( const DtTerrainPagingGeometryPtr geometry,
std::vector< DtTerrainPagingGeometryPtr > &  output 
) const
protectedvirtual

Convert geometry to internal coordinate system.

virtual bool DtOsgEarthTerrainSourceTracker::convertGeometry ( const DtTerrainPagingChord geometry,
std::vector< DtTerrainPagingGeometryPtr > &  output 
) const
protectedvirtual
virtual bool DtOsgEarthTerrainSourceTracker::convertGeometry ( const DtTerrainPagingSphere geometry,
std::vector< DtTerrainPagingGeometryPtr > &  output 
) const
protectedvirtual
virtual bool DtOsgEarthTerrainSourceTracker::convertGeometry ( const DtTerrainPagingShape geometry,
std::vector< DtTerrainPagingGeometryPtr > &  output 
) const
protectedvirtual
virtual bool DtOsgEarthTerrainSourceTracker::nearCenterOfEarth ( const DtChord chord) const
protectedvirtual
virtual bool DtOsgEarthTerrainSourceTracker::findData ( const DtTerrainPagingGeometry geometry,
std::vector< boost::shared_ptr< DtTileData > > &  data,
const DtPagingMetaDataPtr metaData = DtPagingMetaDataPtr() 
) const
protectedvirtual
virtual void DtOsgEarthTerrainSourceTracker::findMissing ( const DtTerrainPagingGeometry geometry,
DtTileKeyList missing 
) const
protectedvirtual
virtual boost::shared_ptr<DtTileData> DtOsgEarthTerrainSourceTracker::findOldest ( ) const
protectedvirtual
virtual boost::shared_ptr<DtTileData> DtOsgEarthTerrainSourceTracker::findOldestUnlocked ( ) const
protectedvirtual

Member Data Documentation

const osg::ref_ptr<osgEarth::MapNode> DtOsgEarthTerrainSourceTracker::myMapNode
protected
std::vector< osg::ref_ptr<osgEarth::ElevationLayer> > DtOsgEarthTerrainSourceTracker::myElevationLayers
protected
bool DtOsgEarthTerrainSourceTracker::myUseRawElevation
protected
unsigned int DtOsgEarthTerrainSourceTracker::myMaxLOD
protected
double DtOsgEarthTerrainSourceTracker::myTriangleOutputMergeTolerance
protected
double DtOsgEarthTerrainSourceTracker::myIntersetionTriangleMergeTolerance
protected
TileRoots DtOsgEarthTerrainSourceTracker::myTileSpatialIndexRoots
protected
double DtOsgEarthTerrainSourceTracker::myWorldWidth
protected
boost::weak_ptr<DtTileData> DtOsgEarthTerrainSourceTracker::myOldestData
protected
DrawerMutex DtOsgEarthTerrainSourceTracker::myDrawerMutex
mutableprotected
std::auto_ptr<DtSharedMemoryBulletDebugDrawer> DtOsgEarthTerrainSourceTracker::myExtentDrawer
protected
std::auto_ptr<DtSharedMemoryBulletDebugDrawer> DtOsgEarthTerrainSourceTracker::myElevationDrawer
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)