VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
osgEarthTerrainSourcePager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 
13 
19 
20 #include <osgEarth/MapNode>
21 #include <osgEarth/GeoData>
22 #include <osgTerrain/Terrain>
23 
24 #include <tbb/concurrent_queue.h>
25 
26 namespace osgEarth
27 {
28  class TerrainTileModel;
29 };
30 
35 {
36 public:
37 
38  DtOsgEarthTerrainSourcePager(DtVantageTerrainEngine* terrainEngine, osgEarth::MapNode* mapNode);
39 
41 
44 
47  virtual void setEarthFileName(const DtFilename& file);
48 
50 
51  virtual DtTerrainIntersectOptions::Fidelity intersectFidelity() const;
52  virtual void setIntersectFidelity(DtTerrainIntersectOptions::Fidelity);
54 
57  virtual bool init();
58 
64  virtual bool pageInTiles(DtTileKeyList& tileIds,
65  DtTerrainIntersectIDType intersectId = 0);
66 
72  virtual bool pageOutTiles(const DtTileKeyList& tilesToRemove);
73 
75  virtual void updatePageTracker(DtTerrainIntersectIDType intersectId = 0);
76 
79  virtual const unsigned int determineTrackerLod();
80 
82  virtual const osgEarth::TerrainOptions& osgEarthTerrainOptions() const;
83 
85  virtual void findMissingTiles(const DtTerrainPagingGeometryPtr& geometry, DtTileKeyList& tiles) const;
86 
87 protected:
98  virtual bool pageInTile(const osgEarth::TileKey& tileKey,
99  DtTerrainIntersectIDType intersectId = 0);
100 
106  virtual bool pageOutTile(const osgEarth::TileKey& tileKey);
107 
112  virtual boost::shared_ptr<DtTileData> createTileDataFromTileModel(
113  const osgEarth::TileKey& tilekey,
114  DtTerrainIntersectIDType intersectId) const;
115 
120  virtual boost::shared_ptr<DtTileData> createTileDataFromHeightfield(
121  const osgEarth::TileKey& tilekey,
122  DtTerrainIntersectIDType intersectId,
123  const osg::ref_ptr<const osg::HeightField>& heightfield) const;
124 
129  virtual boost::shared_ptr<DtTileData> createTileDataFromGeometry(
130  const osgEarth::TileKey& tilekey,
131  DtTerrainIntersectIDType intersectId,
132  const osg::ref_ptr<osg::Node>& geometry) const;
133 
144  virtual void addTile(const osgEarth::TileKey& tilekey, const boost::shared_ptr<DtTileData>& tile);
145 
148  virtual void addEmptyTile(
149  const osgEarth::TileKey& tilekey,
150  DtTerrainIntersectIDType intersectId = 0);
151 
153  virtual void addMasks(const osgEarth::TileKey& tilekey, const boost::shared_ptr<DtTileData>& tile);
154 
156 
158  osg::ref_ptr<osgEarth::MapNode> myMapNode;
159 
161  osg::ref_ptr<osgTerrain::Terrain> myOsgTerrain;
162 
163  typedef std::map<osgEarth::TileKey, boost::shared_ptr<DtTileData> > DtTerrainTileMap;
164 
167 
169  DtFilename myEarthFile;
170 
175  boost::scoped_ptr<DtCutoutCache> myCutoutCache;
176 
179 };
180 

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)