VR-Forces 4.6 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 
17 
18 #include <osgEarth/MapNode>
19 #include <osgEarth/GeoData>
20 #include <osgTerrain/Terrain>
21 
22 #include <tbb/concurrent_queue.h>
23 
24 namespace osgEarth
25 {
26  class TerrainTileModel;
27 };
28 
33 {
34 public:
35 
36  DtOsgEarthTerrainSourcePager(DtVantageTerrainEngine* terrainEngine, osgEarth::MapNode* mapNode);
37 
39 
42 
48  virtual bool pageInTiles(DtTileKeyList& tileIds,
49  DtTerrainIntersectIDType intersectId = 0);
50 
56  virtual bool pageOutTiles(const DtTileKeyList& tilesToRemove);
57 
59  virtual void updatePageTracker(DtTerrainIntersectIDType intersectId = 0);
60 
63  virtual const unsigned int determineTrackerLod();
64 
66  virtual const osgEarth::TerrainOptions& osgEarthTerrainOptions() const;
67 
69  virtual void findMissingTiles(const DtTerrainPagingGeometryPtr& geometry, DtTileKeyList& tiles) const;
70 
71 protected:
82  virtual bool pageInTile(const osgEarth::TileKey& tileKey,
83  DtTerrainIntersectIDType intersectId = 0);
84 
90  virtual bool pageOutTile(const osgEarth::TileKey& tileKey);
91 
96  virtual boost::shared_ptr<DtTileData> createTileDataFromTileModel(
97  const osgEarth::TileKey& tilekey,
98  DtTerrainIntersectIDType intersectId) const;
99 
104  virtual boost::shared_ptr<DtTileData> createTileDataFromHeightfield(
105  const osgEarth::TileKey& tilekey,
106  DtTerrainIntersectIDType intersectId,
107  const osg::ref_ptr<const osg::HeightField>& heightfield) const;
108 
113  virtual boost::shared_ptr<DtTileData> createTileDataFromGeometry(
114  const osgEarth::TileKey& tilekey,
115  DtTerrainIntersectIDType intersectId,
116  const osg::ref_ptr<osg::Node>& geometry) const;
117 
128  virtual void addTile(const osgEarth::TileKey& tilekey, const boost::shared_ptr<DtTileData>& tile);
129 
132  virtual void addEmptyTile(
133  const osgEarth::TileKey& tilekey,
134  DtTerrainIntersectIDType intersectId = 0);
135 
137 
139  osg::ref_ptr<osgEarth::MapNode> myMapNode;
140 
142  osg::ref_ptr<osgTerrain::Terrain> myOsgTerrain;
143 
144  typedef std::map<osgEarth::TileKey, boost::shared_ptr<DtTileData> > DtTerrainTileMap;
145 
148 
150  typedef std::map<std::pair<osgEarth::TileKey, osgEarth::TileKey>, osg::ref_ptr<osg::Node> > MaskGeometryCache;
152 };
153 

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)