![]() |
VR-Forces 4.10 Class Documentation
|
Classes | |
| struct | ElevationRange |
| struct | SubTileSlot |
| struct | ValidElevationRange |
| Elevation range for previous layers. More... | |
Public Member Functions | |
| TileSpatialIndex (const DtTerrainSourceTracker &tracker, const osgEarth::TileKey &tilekey, TileSpatialIndex *parent) | |
| void | getExtent (DtVector &lower, DtVector &upper, bool useElevation=true) const |
| void | getSubTileExtent (unsigned i, DtVector &lower, DtVector &upper, bool useElevation=true) const |
| bool | intersects (const DtTerrainPagingGeometry &geometry) const |
| bool | intersectsSubTile (const DtTerrainPagingGeometry &geometry, int i) const |
| bool | chordIntersects (const DtChord &chord, bool useElevation=true) const |
| bool | extentIntersects (const DtExtent &extent) const |
| bool | sphereIntersects (const DtSphere &sphere) const |
| bool | shapeIntersects (const DtLocalVertexList &shape) const |
| void | findMissing (const DtTerrainPagingGeometry &geometry, DtTileKeyList &missing) const |
| Compute tiles which are not paged in which intersect geometry. More... | |
| bool | findData (const DtTerrainPagingGeometry *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, TileDataCallback *callback=0) const |
| Find tiles which are paged in which intersect geometry. More... | |
| boost::optional< double > | getMaxAltForChord (const DtChord &chord, unsigned maxlod) const |
| Returns an estimate of the max altitude of the area of the elevation data covered by the chord. More... | |
| boost::shared_ptr< DtTileData > | findOldest () const |
| Finds the oldest (last used) tile. More... | |
| bool | addTile (const osgEarth::TileKey &key, const boost::shared_ptr< DtTileData > &data) |
| Adds a tile to the tracker. More... | |
| void | removeTile (const osgEarth::TileKey &tilekey) |
| Pages out data. More... | |
| void | getTiles (std::vector< osgEarth::TileKey > &keys, unsigned lod) |
| Get tiles tileKey list for a specific LOD. More... | |
| unsigned | tileCount () const |
| Number of tiles with data. More... | |
| unsigned | cellCount () const |
| Number of total indexing cells, including ones without data. More... | |
| const osgEarth::TileKey | tileKey () const |
| Tilekey for this index cell. More... | |
| TileSpatialIndex * | setAltitudeRange (const osgEarth::TileKey &key, const ElevationRange &range, const ElevationRange &offsets, unsigned layerNum, bool coversTile) |
| Sets the min/max elevation for a given cell. More... | |
| bool | postProcessIndexLayer (unsigned layerNum) |
| Processes per layer index data. More... | |
| void | writeIndex (IndexInterface &iface, IndexOutputInterface &output, osgEarth::ElevationLayer *layer=0) const |
| Read data from terrain engine and write to stream. More... | |
Protected Member Functions | |
| bool | findDataChord (const DtTerrainPagingChord *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, bool verifyInCache, TileDataCallback *callback=0) const |
| Specific FindData for Chord to speed up the findData by limiting the number of geometry test. More... | |
| bool | findDataShape (const DtTerrainPagingShape *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, bool verifyInCache, TileDataCallback *callback=0) const |
| Specific FindData for Shape to speed up the findData by limiting the number of geometry test. More... | |
| bool | findDataSphere (const DtTerrainPagingSphere *geometry, std::vector< boost::shared_ptr< DtTileData > > &data, bool verifyInCache, TileDataCallback *callback=0) const |
| Specific FindData for Sphere to speed up the findData by limiting the number of geometry test. More... | |
| bool | chordIntersectsSubTile (const DtChord &chord, int i, bool useElevation=true) const |
| bool | extentIntersectsSubTile (const DtExtent &shape, int i) const |
| bool | sphereIntersectsSubTile (const DtSphere &sphere, int i) const |
| bool | shapeIntersectsSubTile (const DtLocalVertexList &shape, int i) const |
| bool | isTileEmpty () const |
| Whether this tile has any data or not. More... | |
| virtual void | recomputePagedInData () |
| When tiles are paged in/out their ancestor tiles frequently need to recompute some data (i.e. More... | |
| SubTileSlot & | getOrCreateSlot (unsigned i) |
| Returns the ith subtile slot which is guaranteed to have the subtile created. More... | |
| void | pageOutSlotIfUnused (unsigned i) |
| Deletes the ith subtile if it has no data beneath it. More... | |
Protected Attributes | |
| const DtTerrainSourceTracker & | myTracker |
| TileSpatialIndex * | myParent |
| const osgEarth::TileKey | myTileKey |
| Tilekey for this index cell. More... | |
| const osgEarth::GeoExtent | myGeoExtent |
| Extent of this index cell. More... | |
| const bool | myUseElevationFlag |
| Whether the min/max elevation should be used for this index cell. More... | |
| boost::optional< ElevationRange > | myElevationRange |
| Elevation range for this tile, computed from highest resolution data (i.e. children) More... | |
| bool | myPinned |
| Index cell not unloaded if true. More... | |
| SubTileSlot | mySubTiles [4] |
| Next level of quadtree. More... | |
| boost::shared_ptr< DtTileData > | myTileData |
| Elevation data for this tile. More... | |
| bool | myAllPagedInFlag |
| Will be set to true if all the data needed to satisify any request in this tile's extent is paged in. More... | |
| bool | myMaxDataLevelFlag |
| True if we have determined that there is no higher resolution data in any subtiles. More... | |
| tbb::spin_rw_mutex | myMutex |
| std::vector< boost::optional < ValidElevationRange > > | myPreviousLayersElevationRange |
| TileSpatialIndex::TileSpatialIndex | ( | const DtTerrainSourceTracker & | tracker, |
| const osgEarth::TileKey & | tilekey, | ||
| TileSpatialIndex * | parent | ||
| ) |
| void TileSpatialIndex::getExtent | ( | DtVector & | lower, |
| DtVector & | upper, | ||
| bool | useElevation = true |
||
| ) | const |
| void TileSpatialIndex::getSubTileExtent | ( | unsigned | i, |
| DtVector & | lower, | ||
| DtVector & | upper, | ||
| bool | useElevation = true |
||
| ) | const |
| bool TileSpatialIndex::intersects | ( | const DtTerrainPagingGeometry & | geometry | ) | const |
| bool TileSpatialIndex::intersectsSubTile | ( | const DtTerrainPagingGeometry & | geometry, |
| int | i | ||
| ) | const |
| bool TileSpatialIndex::shapeIntersects | ( | const DtLocalVertexList & | shape | ) | const |
| void TileSpatialIndex::findMissing | ( | const DtTerrainPagingGeometry & | geometry, |
| DtTileKeyList & | missing | ||
| ) | const |
Compute tiles which are not paged in which intersect geometry.
| bool TileSpatialIndex::findData | ( | const DtTerrainPagingGeometry * | geometry, |
| std::vector< boost::shared_ptr< DtTileData > > & | data, | ||
| TileDataCallback * | callback = 0 |
||
| ) | const |
Find tiles which are paged in which intersect geometry.
If geometry is null then returns all paged in tiles.
| boost::optional<double> TileSpatialIndex::getMaxAltForChord | ( | const DtChord & | chord, |
| unsigned | maxlod | ||
| ) | const |
Returns an estimate of the max altitude of the area of the elevation data covered by the chord.
| boost::shared_ptr<DtTileData> TileSpatialIndex::findOldest | ( | ) | const |
Finds the oldest (last used) tile.
| bool TileSpatialIndex::addTile | ( | const osgEarth::TileKey & | key, |
| const boost::shared_ptr< DtTileData > & | data | ||
| ) |
Adds a tile to the tracker.
The key parameter and the key for the data may not be the same and the data may already be paged in. The key is the area we are marking as valid for the data region, so the key has to be a descendant of the key of the data.
| void TileSpatialIndex::removeTile | ( | const osgEarth::TileKey & | tilekey | ) |
Pages out data.
| void TileSpatialIndex::getTiles | ( | std::vector< osgEarth::TileKey > & | keys, |
| unsigned | lod | ||
| ) |
Get tiles tileKey list for a specific LOD.
| unsigned TileSpatialIndex::tileCount | ( | ) | const |
Number of tiles with data.
| unsigned TileSpatialIndex::cellCount | ( | ) | const |
Number of total indexing cells, including ones without data.
|
inline |
Tilekey for this index cell.
| TileSpatialIndex* TileSpatialIndex::setAltitudeRange | ( | const osgEarth::TileKey & | key, |
| const ElevationRange & | range, | ||
| const ElevationRange & | offsets, | ||
| unsigned | layerNum, | ||
| bool | coversTile | ||
| ) |
Sets the min/max elevation for a given cell.
| void TileSpatialIndex::writeIndex | ( | IndexInterface & | iface, |
| IndexOutputInterface & | output, | ||
| osgEarth::ElevationLayer * | layer = 0 |
||
| ) | const |
Read data from terrain engine and write to stream.
iface functions control which keys get processed.
|
protected |
Specific FindData for Chord to speed up the findData by limiting the number of geometry test.
|
protected |
Specific FindData for Shape to speed up the findData by limiting the number of geometry test.
|
protected |
Specific FindData for Sphere to speed up the findData by limiting the number of geometry test.
|
protected |
|
protected |
|
protected |
Whether this tile has any data or not.
|
protectedvirtual |
When tiles are paged in/out their ancestor tiles frequently need to recompute some data (i.e.
whether their entire area is paged in).
|
protected |
Returns the ith subtile slot which is guaranteed to have the subtile created.
|
protected |
Deletes the ith subtile if it has no data beneath it.
|
protected |
|
protected |
|
protected |
Tilekey for this index cell.
|
protected |
Extent of this index cell.
|
protected |
Whether the min/max elevation should be used for this index cell.
|
protected |
Elevation range for this tile, computed from highest resolution data (i.e. children)
|
protected |
|
protected |
Index cell not unloaded if true.
|
protected |
Next level of quadtree.
|
protected |
Elevation data for this tile.
|
protected |
Will be set to true if all the data needed to satisify any request in this tile's extent is paged in.
|
protected |
True if we have determined that there is no higher resolution data in any subtiles.
|
mutableprotected |