15 #include <osgEarth/ElevationLayer>
17 #include <boost/ptr_container/ptr_vector.hpp>
31 typedef boost::ptr_vector<TileSpatialIndex>
TileRoots;
38 static boost::optional<ElevationRange> Merge(
39 const boost::optional<ElevationRange>& r1,
40 const boost::optional<ElevationRange>& r2);
52 const osgEarth::TileKey& tilekey,
55 void getExtent(
DtVector& lower,
DtVector& upper,
bool useElevation =
true)
const;
56 void getSubTileExtent(
unsigned i,
DtVector& lower,
DtVector& upper,
bool useElevation =
true)
const;
61 bool chordIntersects(
const DtChord& chord,
bool useElevation =
true)
const;
62 bool extentIntersects(
const DtExtent& extent)
const;
63 bool sphereIntersects(
const DtSphere& sphere)
const;
65 bool chordIntersectsSubTile(
const DtChord& chord,
int i,
bool useElevation =
true)
const;
66 bool extentIntersectsSubTile(
const DtExtent& shape,
int i)
const;
67 bool sphereIntersectsSubTile(
const DtSphere& sphere,
int i)
const;
79 std::vector< boost::shared_ptr<DtTileData> >& data,
84 boost::optional<double> getMaxAltForChord(
const DtChord& chord,
unsigned maxlod)
const;
87 boost::shared_ptr<DtTileData> findOldest()
const;
94 bool addTile(
const osgEarth::TileKey& key,
const boost::shared_ptr<DtTileData>& data);
97 void removeTile(
const osgEarth::TileKey& tilekey);
100 void getTiles(std::vector<osgEarth::TileKey>& keys,
unsigned lod);
103 unsigned tileCount()
const;
106 unsigned cellCount()
const;
109 const osgEarth::TileKey
tileKey()
const {
return myTileKey; }
113 const osgEarth::TileKey& key,
114 const ElevationRange& range,
115 const ElevationRange& offsets,
120 bool postProcessIndexLayer(
unsigned layerNum);
127 osgEarth::ElevationLayer* layer = 0)
const;
131 bool isTileEmpty()
const;
135 virtual void recomputePagedInData();
159 : range(range), coversTile(coversTile) { }
178 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:188
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:166
std::list< osgEarth::TileKey > DtTileKeyList
Definition: tileSpatialIndex.h:27
osgEarth::GeoExtent extent
Definition: tileSpatialIndex.h:170
Definition: tileSpatialIndex.h:33
const osgEarth::GeoExtent myGeoExtent
Extent of this index cell.
Definition: tileSpatialIndex.h:143
const bool myUseElevationFlag
Whether the min/max elevation should be used for this index cell.
Definition: tileSpatialIndex.h:145
const osgEarth::TileKey tileKey() const
Tilekey for this index cell.
Definition: tileSpatialIndex.h:109
const DtTerrainSourceTracker & myTracker
Definition: tileSpatialIndex.h:137
double min
Definition: tileSpatialIndex.h:42
Definition: tileSpatialIndex.h:168
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:184
ValidElevationRange(const ElevationRange &range, bool coversTile)
Definition: tileSpatialIndex.h:158
boost::optional< ElevationRange > myElevationRange
Elevation range for this tile, computed from highest resolution data (i.e. children) ...
Definition: tileSpatialIndex.h:148
ElevationRange range
Definition: tileSpatialIndex.h:155
Base class for Terrain Source trackers.
Definition: terrainSourceTracker.h:40
bool myMaxDataLevelFlag
True if we have determined that there is no higher resolution data in any subtiles.
Definition: tileSpatialIndex.h:191
bool coversTile
Definition: tileSpatialIndex.h:156
boost::scoped_ptr< TileSpatialIndex > subtile
Definition: tileSpatialIndex.h:171
std::vector< boost::optional< ValidElevationRange > > myPreviousLayersElevationRange
Definition: tileSpatialIndex.h:162
Definition: terrainSourceTracker.h:171
Definition: tileSpatialIndex.h:36
Generic interface for writing to index.
Definition: indexOutputInterface.h:16
Abstract base class for defining geometric areas for paging of terrain.
Definition: terrainPagingGeometry.h:22
#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:141
Elevation range for previous layers.
Definition: tileSpatialIndex.h:153
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:138
boost::ptr_vector< TileSpatialIndex > TileRoots
Definition: tileSpatialIndex.h:31