VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
DtOsgEarthCacheEstimator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
12 #include <osgEarth/TileKey>
13 
14 // Class Forward Declarations
15 namespace osgEarth
16 {
17  class GeoExtent;
18  class MapNode;
19  class ModelLayer;
20  class Profile;
21  namespace Features
22  {
23  class FeatureModelGraph;
24  }
25 }
26 
27 namespace makVrv
28 {
29  // Class Forward Declarations
30  class DtOsgEarthCache;
31 
36  {
37  public:
39 
41  virtual ~DtOsgEarthCacheEstimator();
42 
44  virtual void setLowestLOD(int lowestLOD);
45 
47  virtual void setHighestLOD(int highestLOD);
48 
50  virtual void addExtent(const osgEarth::GeoExtent& value);
51 
53  virtual void clearExtent();
54 
58  virtual void updateTiles(osgEarth::MapNode* mapNode,std::vector<osgEarth::ModelLayer*>& modelLayers);
59 
61  virtual void setProfile(const osgEarth::Profile* profile);
62 
67  virtual int getNumTilesInModelLayer(osgEarth::MapNode* mapNode, osgEarth::ModelLayer* modelLayer);
68 
70  virtual bool intersects(const osgEarth::GeoExtent& extent);
71 
73  virtual unsigned int numTiles();
74 
76  virtual double getSizeInMB();
77 
79  virtual double getTotalTimeInSeconds();
80 
83  virtual void setSkipImageLayers(bool skip);
84 
87  virtual void setSkipElevationLayers(bool skip);
88 
91  virtual void setSkipModelLayers(bool skip);
92 
94  virtual void reset();
95 
96  void getIntersectTilesForModelLayer(const std::string& modelLayer, std::vector<osgEarth::TileKey>&);
97 
98  private:
103 
104  protected:
108 
113  virtual osgEarth::Features::FeatureModelGraph* findFeatureModelGraph(osgEarth::MapNode* mapNode,
114  osgEarth::ModelLayer* modelLayer);
115 
118  virtual void getIntersectTileInModelLayer(int lod, std::vector<osgEarth::TileKey>& tiles, const osgEarth::Profile* profile);
119 
120  //return 0 if not found
121  const osgEarth::Profile* getProfileForModelGraph(osgEarth::Features::FeatureModelGraph* graph);
122 
123  protected:
124  const osgEarth::Profile* myProfile;
125  std::vector< osgEarth::GeoExtent > myExtents;
126  std::vector< osgEarth::GeoExtent > myLastExtents;
135  //modelLayer name->tile keys intersect in model layer
136  std::map<std::string, std::vector<osgEarth::TileKey> > myIntersectTilesMap;
137  };
138 
142  : public DtVirtualBaseClass
143  {
144  public:
145  static DtOsgEarthCacheEstimatorCreator& instance(DtDe& de);
146  static void registerInstance(DtDe& de, DtOsgEarthCacheEstimatorCreator* creator);
147  virtual DtOsgEarthCacheEstimator* create() const;
148  };
149 }

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)