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

Public Member Functions

 DtOsgEarthGroundCoverSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue, osgEarth::MapNode *mapNode)
 
virtual ~DtOsgEarthGroundCoverSourceTracker ()
 DTOR. More...
 
virtual bool init (DtTerrainSourcePager &)
 Called after options are set. More...
 
virtual bool dataAvailable (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 
virtual void pageInData (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)
 Page in data within geometry. More...
 
virtual bool canPageOutData (DtTerrainIntersectIDType intersectId)
 
virtual DtTerrainIntersectIDType findOldestPagedData (unsigned int &numTriangles)
 Finds the least-recently-used tile and set myOldestPagedObject to it. More...
 
virtual void addPagedInTile (const osgEarth::TileKey &tilekey, const boost::shared_ptr< DtTileData > &tileData)
 Adds a tileId and the corresponding tileData to #myPagedInTiles. More...
 
virtual void removePagedInTile (const osgEarth::TileKey tileKey)
 Removes a tileId and the corresponding tileData from #myPagedInTiles. More...
 
virtual void findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const
 Find all the tiles that intersect the geometry which are not paged in. More...
 
virtual void findPagedInTilesWithinExtent (std::vector< osgEarth::TileKey > &tileKeysPagedIn, const osgEarth::GeoExtent &extent) const
 Finds the TileKeys for all of the Paged in Tiles that intersect the geo extent. More...
 
virtual void pageOutOldestData (const int priority)
 Adds a page out command for the least-recently-used tileID to myCommandQueue. More...
 
virtual void getProceduralTreeTile (DtDebugDrawTerrainOutputInterface::terrainLineList &nodeBoundingList)
 get the ground cover tile box for the debug draw tool More...
 
unsigned maxLOD () const
 Return the max lod (for the ground cover it's the actual ground cover lod) More...
 
 GCTileDataCallback ()
 
virtual bool operator() (const boost::shared_ptr< DtTileData > &tile)=0
 
- Public Member Functions inherited from DtTerrainSourceTracker
 DtTerrainSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue, osgEarth::MapNode *mapNode)
 CTOR. More...
 
virtual ~DtTerrainSourceTracker ()
 DTOR. More...
 
virtual DtTerrainInterfaceConfigconfigOptions ()
 
virtual const
DtTerrainInterfaceConfig
configOptions () const
 
virtual boost::optional
< DtTerrainIntersectOptions::Fidelity
intersectFidelity () const
 Fidelity that this tracker is configured for. More...
 
virtual void addNodesToCollisionMapping (DtNodeId node, DtCollisionObjectList *collObjList)
 
virtual void removeNodeToCollisionMappings (DtNodeId node)
 
virtual DtCollisionObjectList collisionObjectsForNode (DtNodeId node)
 
virtual osgEarth::MapNode * mapNode () const
 Access osgEarth::MapNode object. More...
 
virtual const osgEarth::Profile * profile () const
 Access osgEarth::profile object. More...
 
virtual const Coordinate_SystemlocalCS () const
 Return the local coordinate system. More...
 
virtual void setLabel (const DtString &)
 
virtual void printInfo () const
 
virtual void getPageOutData (DtNodeBoundingList &nodeBoundingList)
 Return a list of bounding sphere that represent the the paged in tiles. More...
 
virtual void getPageInData (DtNodeBoundingList &nodeBoundingList)
 Return a list of bounding sphere that represent the the paged out tiles. More...
 
virtual unsigned getMaxLODForBilinearIntersection () const
 
virtual double intersetionTriangleMergeTolerance () const
 
virtual bool useLandCoverData () const
 Return true if the current tracker use land cover data. More...
 
virtual void getSoilFromString (const std::string &soilType, DtSurface &surface) const
 
virtual double triangleOutputMergeTolerance () const
 
virtual unsigned minElevationIndexLOD () const
 
virtual unsigned maxElevationIndexLOD () const
 
virtual bool useRawElevation () const
 Return true if the current tracker use raw elevation. More...
 
virtual osgEarth::TileKey getBestTileKey (const osgEarth::TileKey &) const
 Return the best tile key to use (based on the tracker) for a pass tilekey. More...
 
virtual bool findTileInCache (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, const DtChord *chord=NULL) const
 Check it the geometry intersect the tileDataCache (when we know the geometry is a chord, pass the chord pointer as the last optional parameters) More...
 
virtual void addTileToCache (const boost::shared_ptr< DtTileData > &data, const DtChord *chord=NULL)
 Add a tile that was not find in the cache (by findTileInCache) (when we know the geometry is a chord, pass the chord pointer as the last optional parameters) More...
 
virtual void clearTileCache ()
 Clear the cache. More...
 

Protected Member Functions

virtual
DtGroundCoverPageInTilesCommand
createGroundCoverPageInTilesCommand (DtPagingMetaDataPtr metaData)
 
virtual
DtGroundCoverPageOutTilesCommand
createGroundCoverPageOutTilesCommand (DtPagingMetaDataPtr metaData)
 
virtual bool findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, const DtPagingMetaDataPtr &metaData=DtPagingMetaDataPtr(), GCTileDataCallback *callback=0) const
 
virtual bool findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, GCTileDataCallback *callback) const
 
virtual void findMissing (const DtTerrainPagingGeometry &geometry, DtTileKeyList &missing) const
 
virtual boost::shared_ptr
< DtTileData
findOldestUnlocked () const
 

Protected Attributes

TileRootsmyTileSpatialIndexRoots
 roots of the quad tree (not necessarily 4, geodetic usually has 2) More...
 
boost::weak_ptr< DtTileDatamyOldestData
 cached pointer to oldest tile data More...
 
const double myWorldWidth
 width of world in osgearth coord sys, used for wrapping coords More...
 
unsigned int myGroundCoverLod
 ground cover lod More...
 
- Protected Attributes inherited from DtTerrainSourceTracker
DtString myLabel
 
DtTerrainInterfaceConfig myConfig
 
DtPagerCommandQueuemyCommandQueue
 
DtNodeToCollObjMMap myNodeToCollObjMMap
 
tbb::spin_rw_mutex myMutex
 
tbb::spin_rw_mutex myTileCacheMutex
 
DtVantageTerrainEnginemyVantageTerrainEngine
 
const osg::ref_ptr
< osgEarth::MapNode > 
myMapNode
 map node for whole terrain More...
 
const osgEarth::Map * myMap
 
const osgEarth::Profile * myMapProfile
 
tileDataCacheVector myTileDataCache
 Tile Data cache to speed up intersections. More...
 
tbb::atomic< intmyTileCacheHit
 Stats for cache. More...
 
tbb::atomic< intmyTileCacheQuery
 
DtTerrainSourcePagermyPager
 

Private Attributes

bool myIsFinished
 

Friends

class DtOsgEarthGroundCoverSourceTracker
 

Constructor & Destructor Documentation

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

DTOR.

Member Function Documentation

virtual bool DtOsgEarthGroundCoverSourceTracker::init ( DtTerrainSourcePager )
virtual

Called after options are set.

Returns false if error.

Reimplemented from DtTerrainSourceTracker.

virtual bool DtOsgEarthGroundCoverSourceTracker::dataAvailable ( DtPagingMetaDataPtr  metaData,
DtTerrainPagingGeometryPtr  geometry 
)
virtual
Returns
True if all data along this chord has been paged in.

Implements DtTerrainSourceTracker.

virtual void DtOsgEarthGroundCoverSourceTracker::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 bool DtOsgEarthGroundCoverSourceTracker::canPageOutData ( DtTerrainIntersectIDType  intersectId)
virtual
virtual DtTerrainIntersectIDType DtOsgEarthGroundCoverSourceTracker::findOldestPagedData ( unsigned int numTriangles)
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 DtOsgEarthGroundCoverSourceTracker::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 DtOsgEarthGroundCoverSourceTracker::removePagedInTile ( const osgEarth::TileKey  tileKey)
virtual

Removes a tileId and the corresponding tileData from #myPagedInTiles.

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

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

virtual void DtOsgEarthGroundCoverSourceTracker::findPagedInTilesWithinExtent ( std::vector< osgEarth::TileKey > &  tileKeysPagedIn,
const osgEarth::GeoExtent &  extent 
) const
virtual

Finds the TileKeys for all of the Paged in Tiles that intersect the geo extent.

virtual void DtOsgEarthGroundCoverSourceTracker::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 DtOsgEarthGroundCoverSourceTracker::getProceduralTreeTile ( DtDebugDrawTerrainOutputInterface::terrainLineList nodeBoundingList)
virtual

get the ground cover tile box for the debug draw tool

Reimplemented from DtTerrainSourceTracker.

unsigned DtOsgEarthGroundCoverSourceTracker::maxLOD ( ) const
virtual

Return the max lod (for the ground cover it's the actual ground cover lod)

Reimplemented from DtTerrainSourceTracker.

virtual DtGroundCoverPageInTilesCommand* DtOsgEarthGroundCoverSourceTracker::createGroundCoverPageInTilesCommand ( DtPagingMetaDataPtr  metaData)
protectedvirtual
virtual DtGroundCoverPageOutTilesCommand* DtOsgEarthGroundCoverSourceTracker::createGroundCoverPageOutTilesCommand ( DtPagingMetaDataPtr  metaData)
protectedvirtual
virtual bool DtOsgEarthGroundCoverSourceTracker::findData ( const DtTerrainPagingGeometry geometry,
std::vector< boost::shared_ptr< DtTileData > > &  data,
const DtPagingMetaDataPtr metaData = DtPagingMetaDataPtr(),
GCTileDataCallback callback = 0 
) const
protectedvirtual
virtual bool DtOsgEarthGroundCoverSourceTracker::findData ( const DtTerrainPagingGeometry geometry,
std::vector< boost::shared_ptr< DtTileData > > &  data,
GCTileDataCallback callback 
) const
protectedvirtual
virtual void DtOsgEarthGroundCoverSourceTracker::findMissing ( const DtTerrainPagingGeometry geometry,
DtTileKeyList missing 
) const
protectedvirtual
virtual boost::shared_ptr<DtTileData> DtOsgEarthGroundCoverSourceTracker::findOldestUnlocked ( ) const
protectedvirtual
DtOsgEarthGroundCoverSourceTracker::GCTileDataCallback ( )
explicit
virtual bool DtOsgEarthGroundCoverSourceTracker::operator() ( const boost::shared_ptr< DtTileData > &  tile)
pure virtual

Friends And Related Function Documentation

Member Data Documentation

TileRoots* DtOsgEarthGroundCoverSourceTracker::myTileSpatialIndexRoots
protected

roots of the quad tree (not necessarily 4, geodetic usually has 2)

boost::weak_ptr<DtTileData> DtOsgEarthGroundCoverSourceTracker::myOldestData
protected

cached pointer to oldest tile data

const double DtOsgEarthGroundCoverSourceTracker::myWorldWidth
protected

width of world in osgearth coord sys, used for wrapping coords

unsigned int DtOsgEarthGroundCoverSourceTracker::myGroundCoverLod
protected

ground cover lod

bool DtOsgEarthGroundCoverSourceTracker::myIsFinished
private

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)