![]() |
VR-Forces 4.7 Class Documentation
|
Classes | |
| struct | IndexConfig |
| Information about each individual index file. More... | |
| class | IndexInputInterface |
| Generic interface for reading from index. More... | |
| class | IndexInterface |
| Interface for allowing users to monitor/control the indexing process. More... | |
| class | IndexOutputInterface |
| Generic interface for writing to index. More... | |
| class | TileSpatialIndex |
Public Member Functions | |
| DtOsgEarthTerrainSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue, osgEarth::MapNode *mapNode) | |
| virtual bool | useRawElevation () const |
| True if using elevation data (i.e. if using osgEarth REX engine). | |
| virtual boost::optional < DtTerrainIntersectOptions::Fidelity > | intersectFidelity () const |
| Fidelity this tracker is configured for. | |
| virtual unsigned | tileCount () const |
| Number of currently paged in tiles. | |
| virtual unsigned | cellCount () const |
| Number of cells in index. | |
| virtual osgEarth::MapNode * | mapNode () const |
| Access osgEarth::MapNode object. | |
| virtual bool | init (DtTerrainSourcePager &) |
| Initialize after configuration. | |
| 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 (DtTerrainIntersectStatus &status, const DtChord &chord, DtVrfChordIntersectRecordList &intList, const DtTerrainIntersectOptions &options) const |
| Performs terrain intersections. | |
| virtual bool | halveChordAndFindHeightFieldIntrx (const DtChord &chord, DtChord convertedChord, const DtTerrainIntersectOptions &options, DtTerrainIntersectStatus &status, DtVrfChordIntersectRecordList &intList) const |
| Used in findHeightFieldIntersections. | |
| virtual bool | splitChordAt180AndFindHeightFieldIntrx (const DtChord &chord, const DtTerrainIntersectOptions &options, DtTerrainIntersectStatus &status, DtVrfChordIntersectRecordList &intList) const |
| Used in findHeightFieldIntersections. | |
| virtual void | processTriangles (DtTriangleOutputInterface &output, const DtTerrainProcessPolygonsBox &box) const |
| Outputs triangles interpolated from elevation data. | |
| 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 bool | canPageOutData (DtTerrainIntersectIDType intersectId) |
| Returns true if there is data that can be paged out. | |
| virtual osgEarth::TileKey | getBestTileKey (const osgEarth::TileKey &) const |
| Uses osgearth layer data to find the smallest lod for a given area that actually has data. | |
| virtual void | findMissingTiles (const DtTerrainPagingGeometryPtr &geometry, DtTileKeyList &tiles) const |
| Find all the tiles that intersect the geometry which are not paged in. | |
| virtual void | writeIndex (IndexInterface &, IndexOutputInterface &) const |
| Writes an index using the whole terrain (i.e. merged) elevation data. | |
| virtual bool | writeIndexLayers (IndexInterface &, unsigned precision) const |
| Writes indices for each elevation layer. | |
| virtual std::vector< IndexConfig > | getIndexConfigInfoForLayer (const osgEarth::ElevationLayer &layer) const |
| Return vector of index config objects, one per each index set in layer. | |
| virtual void | readIndex (IndexInputInterface &, unsigned layerNumber, const IndexConfig &idxConfig) |
| Reads an index file. | |
| virtual bool | readIndexLayers () |
| Reads per layer index files. | |
| TileDataCallback () | |
| virtual bool | operator() (const boost::shared_ptr< DtTileData > &tile)=0 |
| virtual unsigned | maxLOD () const |
| Max lod that the tracker will generate. | |
| virtual void | setMaxLOD (unsigned) |
| virtual unsigned | getMaxLODForBilinearIntersection () const |
| Max lod at which intersections will be done by exact solution of bilinear surface. | |
| virtual void | setMaxLODForBilinearIntersection (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) |
| virtual unsigned | minElevationIndexLOD () const |
| Sets the range of LOD levels where elevation values from the terrain index will be used. | |
| virtual void | setMinElevationIndexLOD (unsigned) |
| virtual unsigned | maxElevationIndexLOD () const |
| virtual void | setMaxElevationIndexLOD (unsigned) |
| virtual double | maxChordLengthBeforeSplitSquared () const |
| Set the max chord length before chords are split. | |
| virtual void | setMaxChordLengthBeforeSplit (double) |
| virtual unsigned | maxElevationChordSplitTestLOD () const |
| Sets the max lod used to estimate max terrain elevation under chords. | |
| virtual void | setMaxElevationChordSplitTestLOD (unsigned) |
Public Member Functions inherited from DtTerrainSourceTracker | |
| DtTerrainSourceTracker (DtVantageTerrainEngine *, DtPagerCommandQueue *commandQueue) | |
| virtual | ~DtTerrainSourceTracker () |
| virtual DtTerrainInterfaceConfig & | configOptions () |
| virtual const DtTerrainInterfaceConfig & | configOptions () const |
| virtual bool | init (DtTerrainSourcePager &) |
| Called after options are set. | |
| virtual boost::optional < DtTerrainIntersectOptions::Fidelity > | intersectFidelity () const |
| Fidelity that this tracker is configured for. | |
| virtual bool | dataAvailable (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)=0 |
| virtual void | pageInData (DtPagingMetaDataPtr metaData, DtTerrainPagingGeometryPtr geometry)=0 |
| virtual bool | canPageOutData (DtTerrainIntersectIDType intersectId)=0 |
| virtual DtTerrainIntersectIDType | findOldestPagedData (unsigned int &numTriangles)=0 |
| virtual void | pageOutOldestData (const int priority)=0 |
| virtual void | addNodesToCollisionMapping (DtNodeId node, DtCollisionObjectList *collObjList) |
| virtual void | removeNodeToCollisionMappings (DtNodeId node) |
| virtual DtCollisionObjectList | collisionObjectsForNode (DtNodeId node) |
| virtual const Coordinate_System * | localCS () const |
| virtual void | setLabel (const DtString &) |
| virtual void | printInfo () const |
Protected Types | |
| typedef boost::ptr_vector < TileSpatialIndex > | TileRoots |
Protected Member Functions | |
| virtual DtPageInTilesCommand * | createPageInTilesCommand (DtPagingMetaDataPtr metaData) |
| virtual DtPageOutTilesCommand * | createPageOutTilesCommand (DtPagingMetaDataPtr metaData) |
| virtual bool | nearCenterOfEarth (const DtChord &chord) const |
| virtual bool | aboveAllTerrain (const DtChord &geocentricChord, const DtChord &geodeticCoord) const |
| virtual bool | shortEnoughForIntersection (const DtChord &geocentricChord, const DtChord &geodeticChord, double chordLengthSq) const |
| Determines if the chord is (not) above the threshold length myMaxChordLengthBeforeSplitSquared. | |
| virtual bool | crosses180Lon (const DtChord &geodeticChord) const |
| Determines if the chord goes between end points that are on opposite sides of the lon = 180 meridian. | |
| virtual bool | findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, const DtPagingMetaDataPtr &metaData=DtPagingMetaDataPtr(), TileDataCallback *callback=0) const |
| virtual bool | findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, TileDataCallback *callback) const |
| virtual void | findMissing (const DtTerrainPagingGeometry &geometry, DtTileKeyList &missing) const |
| virtual boost::shared_ptr < DtTileData > | findOldest () const |
| virtual boost::shared_ptr < DtTileData > | findOldestUnlocked () const |
| 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 |
Protected Attributes | |
| const osg::ref_ptr < osgEarth::MapNode > | myMapNode |
| map node for whole terrain | |
| osgEarth::ElevationLayerVector | myElevationLayers |
| top level elevation layers | |
| osgEarth::ElevationLayerVector | myFlattenedElevationLayers |
| flattens composite layers | |
| const bool | myUseRawElevation |
| use elevation (if false old geometry system will be used) | |
| unsigned int | myMaxLOD |
| max LOD of the whole system | |
| unsigned int | myMaxLODForBilinearIntersection |
| max LOD which will use exact intersection with bilinear surface | |
| double | myTriangleOutputMergeTolerance |
| max error tolerances used to decide when it's not necessary triangle elevation to full resolution | |
| double | myIntersetionTriangleMergeTolerance |
| unsigned | myMinElevationIndexLOD |
| range of LODs where elevation from index will be used | |
| unsigned | myMaxElevationIndexLOD |
| double | myMaxChordLengthBeforeSplitSquared |
| max chord length squared before chords are split | |
| unsigned | myMaxElevationChordSplitLOD |
| max lod used for estimated max elevation under chord for spliting chords | |
| TileRoots | myTileSpatialIndexRoots |
| roots of the quad tree (not necessarily 4, geodetic usually has 2) | |
| const double | myWorldWidth |
| width of world in osgearth coord sys, used for wrapping coords | |
| DtTerrainIntersectOptions::Fidelity | myFidelity |
| intersect fidelity for this layer | |
| boost::weak_ptr< DtTileData > | myOldestData |
| cached pointer to oldest tile data | |
Protected Attributes inherited from DtTerrainSourceTracker | |
| DtString | myLabel |
| DtTerrainInterfaceConfig | myConfig |
| DtPagerCommandQueue * | myCommandQueue |
| DtNodeToCollObjMMap | myNodeToCollObjMMap |
| tbb::spin_rw_mutex | myMutex |
| DtVantageTerrainEngine * | myVantageTerrainEngine |
Private Attributes | |
| bool | myIsFinished |
Friends | |
| class | DtOsgEarthTerrainSourceTracker |
|
protected |
| DtOsgEarthTerrainSourceTracker::DtOsgEarthTerrainSourceTracker | ( | DtVantageTerrainEngine * | , |
| DtPagerCommandQueue * | commandQueue, | ||
| osgEarth::MapNode * | mapNode | ||
| ) |
|
virtual |
True if using elevation data (i.e. if using osgEarth REX engine).
|
virtual |
Fidelity this tracker is configured for.
|
virtual |
Max lod that the tracker will generate.
|
virtual |
|
virtual |
Max lod at which intersections will be done by exact solution of bilinear surface.
Higher lods will be intersected against the same triangle grid that REX uses.
|
virtual |
|
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 |
|
virtual |
|
virtual |
|
virtual |
Sets the range of LOD levels where elevation values from the terrain index will be used.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Set the max chord length before chords are split.
|
virtual |
|
virtual |
Sets the max lod used to estimate max terrain elevation under chords.
|
virtual |
|
virtual |
Number of currently paged in tiles.
|
virtual |
Number of cells in index.
|
virtual |
Access osgEarth::MapNode object.
|
virtual |
Initialize after configuration.
|
virtual |
Adds a tileId and the corresponding tileData to #myPagedInTiles.
| tileId | Key for the tileData passed in. |
| tileData | tileData to create the tileId -> tileData mapping with. |
|
virtual |
Removes a tileId and the corresponding tileData from #myPagedInTiles.
|
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.
| geometry | The geometry to test for data available. |
| intersectId | Optional parameter to mark already-paged-in tiles with. |
|
virtual |
Performs terrain intersections.
| status | See DtTerrainIntersectStatus. |
| chord | Chord to intersect. |
| intList | Results added to this. |
| options | See DtTerrainIntersectOptions. |
|
virtual |
Used in findHeightFieldIntersections.
Splits a long chord (shortEnoughForIntersection is false) into halves and recursively checks findHeightFieldIntersections on each.
|
virtual |
Used in findHeightFieldIntersections.
Splits the chord at lon = 180 (Geoc y=0) and recursively checks findHeightFieldIntersections on each part.
|
virtual |
Outputs triangles interpolated from elevation data.
| output | Output interface which received triangles. |
| box | Query which defines which area is output. |
|
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.
| geometry | The geometry to page in data within. |
| intersectId | Id to assign to the page in command to seed tileData for newly paged-in tiles. |
| priority | Priority to use for commands generated by this call. |
|
virtual |
Finds the least-recently-used tile and set myOldestPagedObject to it.
| numTrianglesOut | The number of triangles the least-recently-used tileId represents in the collision world. |
|
virtual |
Adds a page out command for the least-recently-used tileID to myCommandQueue.
| priority | Priority to use for commands generated by this call. |
|
virtual |
Returns true if there is data that can be paged out.
|
virtual |
Uses osgearth layer data to find the smallest lod for a given area that actually has data.
The osgearth APIs can only return a larger tile (i.e. smaller lod), so this function is used by starting with the highest LOD (the max LOD set, which is 19 by default for REX) and then going up. Elevation layers may not have any information on this in which case the input key will be returned. This is all used so that we don't have to always have to start checking for data at the highest LOD. The quadtree itself uses this to cap the depth in a given area.
|
virtual |
Find all the tiles that intersect the geometry which are not paged in.
|
virtual |
Writes an index using the whole terrain (i.e. merged) elevation data.
|
virtual |
Writes indices for each elevation layer.
|
virtual |
Return vector of index config objects, one per each index set in layer.
|
virtual |
Reads an index file.
|
virtual |
Reads per layer index files.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Convert geometry to internal coordinate system.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
Determines if the chord is (not) above the threshold length myMaxChordLengthBeforeSplitSquared.
|
protectedvirtual |
Determines if the chord goes between end points that are on opposite sides of the lon = 180 meridian.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
explicit |
|
pure virtual |
|
friend |
|
protected |
map node for whole terrain
|
protected |
top level elevation layers
|
protected |
flattens composite layers
|
protected |
use elevation (if false old geometry system will be used)
max LOD which will use exact intersection with bilinear surface
|
protected |
max error tolerances used to decide when it's not necessary triangle elevation to full resolution
|
protected |
|
protected |
range of LODs where elevation from index will be used
|
protected |
|
protected |
max chord length squared before chords are split
|
protected |
max lod used for estimated max elevation under chord for spliting chords
|
protected |
roots of the quad tree (not necessarily 4, geodetic usually has 2)
|
protected |
width of world in osgearth coord sys, used for wrapping coords
|
protected |
intersect fidelity for this layer
|
protected |
cached pointer to oldest tile data
|
private |