VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
20 #include <tbb/concurrent_queue.h>
21 
22 #include <osgTerrain/Terrain>
23 
24 typedef std::map<osgEarth::TileKey, osg::ref_ptr<osg::Node> > DtTerrainTileMap;
25 
30 {
31 public:
32 
33  DtOsgEarthTerrainSourcePager(DtVantageTerrainEngine* terrainEngine, osgEarth::MapNode* mapNode);
34 
36 
39 
45  virtual bool pageInTiles(DtTileKeyList& tileIds,
46  DtTerrainIntersectIDType intersectId = 0);
47 
53  virtual bool pageOutTiles(const DtTileKeyList& tilesToRemove);
54 
56  virtual void updatePageTracker(DtTerrainIntersectIDType intersectId = 0);
57 
60  virtual const unsigned int determineTrackerLod();
61 
62 protected:
63 
71  virtual bool addCollisionObject(osg::ref_ptr<osg::Node> node,
72  unsigned int& numTrianglesOut);
73 
84  virtual bool pageInTile(const osgEarth::TileKey& tileKey,
85  DtTerrainIntersectIDType intersectId = 0);
86 
92  virtual bool pageOutTile(const osgEarth::TileKey& tileKey);
93 
101  virtual DtTileData* createTileData(const osgEarth::TileKey& tileKey,
102  const unsigned int& numTriangles,
103  DtTerrainIntersectIDType intersectId = 0) const;
104 
105 protected:
106 
109  virtual void createEmptyTile(const osgEarth::TileKey& tileKey,
110  DtTerrainIntersectIDType intersectId = 0);
111 
113  osg::ref_ptr<osgEarth::MapNode> myMapNode;
114 
116 
117  osg::ref_ptr<osgTerrain::Terrain> myOsgTerrain;
119 
122 
123 };
124 

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)