VR-Forces 4.1 Class Documentation
osgEarthTerrainSourceTracker.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
16 
17 #include <vrfutil/vertexList.h>
18 
19 //Mak Terrain Toolkit includes
20 #include <geometry/sphere.h>
21 
22 #include <vlutil/vlSmartPointers.h>
23 
24 #include <osgTerrain/TerrainTile>
25 #include <osgEarth/Profile>
26 #include <osgEarth/TileKey>
27 
28 #include <string>
29 #include <list>
30 
33 
34 typedef std::list< osgEarth::TileKey > DtTileKeyList;
35 
37 {
38 public:
39 
41  const osgEarth::Profile* profile, unsigned int lod);
42 
44 
48  virtual void addPagedInTile(const osgEarth::TileKey tileKey, DtTileData* tileData);
49 
51  virtual void removePagedInTile(const osgEarth::TileKey tileKey);
52 
59  virtual bool dataAvailable(DtPagingMetaDataPtr metaData,
61 
69  virtual void pageInData(DtPagingMetaDataPtr metaData,
71 
77  virtual unsigned int findOldestPagedData(unsigned int& numTrianglesOut);
78 
81  virtual void pageOutOldestData(const int priority);
82 
84  virtual void drawDebugInfo(btIDebugDraw* debugDrawer);
85 
87  virtual bool canPageOutData(unsigned int intersectId);
88 
89 protected:
90 
91  virtual DtPageInTilesCommand* createPageInTilesCommand(
92  DtPagingMetaDataPtr metaData);
93 
94  virtual DtPageOutTilesCommand* createPageOutTilesCommand(
95  DtPagingMetaDataPtr metaData);
96 
98  virtual void tilesInGeometry(DtTerrainPagingGeometryPtr geometry,
99  DtTileKeyList& tilesOut);
100 
105  virtual void pageOutData(const DtTileKeyList tilesToRemove, const int priority);
106 
107  virtual void tilesUnderChord(const DtChord& chord,
108  DtTileKeyList& tilesOut);
109 
110  virtual void tilesInSphere(const DtSphere& sphere,
111  DtTileKeyList& tilesOut);
112 
113  virtual void tilesInShape(const DtLocalVertexList& vertices,
114  DtTileKeyList& tilesOut);
115 
116  virtual bool dataAvailable(DtTileKeyList& keyList,
117  const unsigned int intersectId = 0);
118 
119  virtual void drawTile(btIDebugDraw* debugDrawer, const DtTileData& tileData);
120 
121 protected:
122 
125 
126  std::set<osgEarth::TileKey> myTilesPendingRemoval;
127 
128  osg::ref_ptr<const osgEarth::Profile> myProfile;
129 
130  unsigned int myLOD;
131 
132  osgEarth::TileKey* myOldestPagedObject;
133 
135 };
136 
137 

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)