15 #include <osgEarth/ElevationLayer>
17 #include <boost/ptr_container/ptr_vector.hpp>
19 #include <tbb/spin_rw_mutex.h>
36 typedef boost::ptr_vector<TileSpatialIndex>
TileRoots;
43 static boost::optional<ElevationRange> Merge(
44 const boost::optional<ElevationRange>& r1,
45 const boost::optional<ElevationRange>& r2);
57 const osgEarth::TileKey& tilekey,
60 void getExtent(
DtVector& lower,
DtVector& upper,
bool useElevation =
true)
const;
61 void getSubTileExtent(
unsigned i,
DtVector& lower,
DtVector& upper,
bool useElevation =
true)
const;
66 bool chordIntersects(
const DtChord& chord,
bool useElevation =
true)
const;
67 bool extentIntersects(
const DtExtent& extent)
const;
68 bool sphereIntersects(
const DtSphere& sphere)
const;
80 std::vector< boost::shared_ptr<DtTileData> >& data,
85 boost::optional<double> getMaxAltForChord(
const DtChord& chord,
unsigned maxlod)
const;
88 boost::shared_ptr<DtTileData> findOldest()
const;
95 bool addTile(
const osgEarth::TileKey& key,
const boost::shared_ptr<DtTileData>& data);
98 void removeTile(
const osgEarth::TileKey& tilekey);
101 void getTiles(std::vector<osgEarth::TileKey>& keys,
unsigned lod);
104 unsigned tileCount()
const;
107 unsigned cellCount()
const;
110 const osgEarth::TileKey
tileKey()
const {
return myTileKey; }
114 const osgEarth::TileKey& key,
115 const ElevationRange& range,
116 const ElevationRange& offsets,
121 bool postProcessIndexLayer(
unsigned layerNum);
128 osgEarth::ElevationLayer* layer = 0)
const;
137 std::vector< boost::shared_ptr<DtTileData> >& data,
bool verifyInCache,
145 std::vector< boost::shared_ptr<DtTileData> >& data,
bool verifyInCache,
153 std::vector< boost::shared_ptr<DtTileData> >& data,
bool verifyInCache,
156 bool chordIntersectsSubTile(
const DtChord& chord,
int i,
bool useElevation =
true)
const;
157 bool extentIntersectsSubTile(
const DtExtent& shape,
int i)
const;
158 bool sphereIntersectsSubTile(
const DtSphere& sphere,
int i)
const;
162 bool isTileEmpty()
const;
166 virtual void recomputePagedInData();
168 bool allPagedIn()
const;
192 : range(range), coversTile(coversTile) { }
211 void pageOutSlotIfUnused(
unsigned i);
bool myAllPagedInFlag
Will be set to true if all the data needed to satisify any request in this tile's extent is paged in...
Definition: tileSpatialIndex.h:221
NOTE: This entire class is deprecated, in favor of Dt3dChord.
Definition: chord.h:40
bool myPinned
Index cell not unloaded if true.
Definition: tileSpatialIndex.h:199
std::list< osgEarth::TileKey > DtTileKeyList
Definition: tileSpatialIndex.h:32
osgEarth::GeoExtent extent
Definition: tileSpatialIndex.h:203
Definition: tileSpatialIndex.h:38
A terrain paging geometry which defines the paging area to be along a given shape.
Definition: terrainPagingShape.h:19
const osgEarth::GeoExtent myGeoExtent
Extent of this index cell.
Definition: tileSpatialIndex.h:176
const bool myUseElevationFlag
Whether the min/max elevation should be used for this index cell.
Definition: tileSpatialIndex.h:178
const osgEarth::TileKey tileKey() const
Tilekey for this index cell.
Definition: tileSpatialIndex.h:110
A terrain paging geometry which defines the paging area to be along a given set of local vertices...
Definition: terrainPagingSphere.h:20
const DtTerrainSourceTracker & myTracker
Definition: tileSpatialIndex.h:170
double min
Definition: tileSpatialIndex.h:47
Definition: tileSpatialIndex.h:201
tbb::spin_rw_mutex myMutex
Definition: tileSpatialIndex.h:226
The DtExtent represents an axis-aligned 3d bounding box.
Definition: extent.h:43
boost::shared_ptr< DtTileData > myTileData
Elevation data for this tile.
Definition: tileSpatialIndex.h:217
ValidElevationRange(const ElevationRange &range, bool coversTile)
Definition: tileSpatialIndex.h:191
boost::optional< ElevationRange > myElevationRange
Elevation range for this tile, computed from highest resolution data (i.e. children) ...
Definition: tileSpatialIndex.h:181
ElevationRange range
Definition: tileSpatialIndex.h:188
Base class for Terrain Source trackers. Determines if the necessary data To perform an intersection i...
Definition: terrainSourceTracker.h:75
bool myMaxDataLevelFlag
True if we have determined that there is no higher resolution data in any subtiles.
Definition: tileSpatialIndex.h:224
bool coversTile
Definition: tileSpatialIndex.h:189
boost::scoped_ptr< TileSpatialIndex > subtile
Definition: tileSpatialIndex.h:204
std::vector< boost::optional< ValidElevationRange > > myPreviousLayersElevationRange
Definition: tileSpatialIndex.h:195
Definition: terrainSourceTracker.h:247
Definition: tileSpatialIndex.h:41
Generic interface for writing to index.
Definition: indexOutputInterface.h:16
Abstract base class for defining geometric areas for paging of terrain. Subclasses of this class will...
Definition: terrainPagingGeometry.h:24
A terrain paging geometry which defines the paging area to be along a given chord.
Definition: terrainPagingChord.h:19
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
const osgEarth::TileKey myTileKey
Tilekey for this index cell.
Definition: tileSpatialIndex.h:174
Elevation range for previous layers. Used when a data for the current layer doesn't cover the whole t...
Definition: tileSpatialIndex.h:186
class DtLocalVertexList:
Definition: localVertexList.h:20
Interface for allowing users to monitor/control the indexing process.
Definition: indexInterface.h:13
TileSpatialIndex * myParent
Definition: tileSpatialIndex.h:171
boost::ptr_vector< TileSpatialIndex > TileRoots
Definition: tileSpatialIndex.h:36