VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtOsgEarthCacheEstimator.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2017 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
14 #include <osgEarth/TileKey>
15 
16 // Class Forward Declarations
17 namespace osgEarth
18 {
19  class GeoExtent;
20  class MapNode;
21  class ModelLayer;
22  class Profile;
23  namespace Features
24  {
25  class FeatureModelGraph;
26  }
27 }
28 
29 namespace makVrv
30 {
31  // Class Forward Declarations
32  class DtOsgEarthCache;
33 
38  {
39  public:
41 
43  virtual ~DtOsgEarthCacheEstimator();
44 
46  virtual void setLowestLOD(int lowestLOD);
47 
49  virtual void setHighestLOD(int highestLOD);
50 
52  virtual void addExtent(const osgEarth::GeoExtent& value);
53 
55  virtual void clearExtent();
56 
60  virtual void updateTiles(osgEarth::MapNode* mapNode,std::vector<osgEarth::ModelLayer*>& modelLayers);
61 
63  virtual void setProfile(const osgEarth::Profile* profile);
64 
69  virtual int getNumTilesInModelLayer(osgEarth::MapNode* mapNode, osgEarth::ModelLayer* modelLayer);
70 
72  virtual bool intersects(const osgEarth::GeoExtent& extent);
73 
75  virtual unsigned int numTiles();
76 
78  virtual double getSizeInMB();
79 
81  virtual double getTotalTimeInSeconds();
82 
85  virtual void setSkipImageLayers(bool skip);
86 
89  virtual void setSkipElevationLayers(bool skip);
90 
93  virtual void setSkipModelLayers(bool skip);
94 
96  virtual void reset();
97 
98  void getIntersectTilesForModelLayer(const std::string& modelLayer, std::vector<osgEarth::TileKey>&);
99 
100  private:
105 
106  protected:
110 
115  virtual osgEarth::Features::FeatureModelGraph* findFeatureModelGraph(osgEarth::MapNode* mapNode,
116  osgEarth::ModelLayer* modelLayer);
117 
120  virtual void getIntersectTileInModelLayer(int lod, std::vector<osgEarth::TileKey>& tiles, const osgEarth::Profile* profile);
121 
122  //return 0 if not found
123  const osgEarth::Profile* getProfileForModelGraph(osgEarth::Features::FeatureModelGraph* graph);
124 
125  protected:
126  const osgEarth::Profile* myProfile;
127  std::vector< osgEarth::GeoExtent > myExtents;
128  std::vector< osgEarth::GeoExtent > myLastExtents;
137  //modelLayer name->tile keys intersect in model layer
138  std::map<std::string, std::vector<osgEarth::TileKey> > myIntersectTilesMap;
139  };
140 
144  : public DtVirtualBaseClass
145  {
146  public:
147  static DtOsgEarthCacheEstimatorCreator& instance(DtDe& de);
148  static void registerInstance(DtDe& de, DtOsgEarthCacheEstimatorCreator* creator);
149  virtual DtOsgEarthCacheEstimator* create() const;
150  };
151 }

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)