VR-Forces 4.10 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 Util {
24  class FeatureModelGraph;
25  }
26 }
27 
28 namespace makVrv
29 {
30  // Class Forward Declarations
31  class DtOsgEarthCache;
32 
37  {
38  public:
40 
42  virtual ~DtOsgEarthCacheEstimator();
43 
45  virtual void setLowestLOD(int lowestLOD);
46 
48  virtual void setHighestLOD(int highestLOD);
49 
51  virtual void addExtent(const osgEarth::GeoExtent& value);
52 
54  virtual void clearExtent();
55 
59  virtual void updateTiles(osgEarth::MapNode* mapNode,std::vector<osgEarth::ModelLayer*>& modelLayers);
60 
62  virtual void setProfile(const osgEarth::Profile* profile);
63 
68  virtual int getNumTilesInModelLayer(osgEarth::MapNode* mapNode, osgEarth::ModelLayer* modelLayer);
69 
71  virtual bool intersects(const osgEarth::GeoExtent& extent);
72 
74  virtual unsigned int numTiles();
75 
77  virtual double getSizeInMB();
78 
80  virtual double getTotalTimeInSeconds();
81 
84  virtual void setSkipImageLayers(bool skip);
85 
88  virtual void setSkipElevationLayers(bool skip);
89 
92  virtual void setSkipModelLayers(bool skip);
93 
95  virtual void reset();
96 
97  void getIntersectTilesForModelLayer(const std::string& modelLayer, std::vector<osgEarth::TileKey>&);
98 
99  private:
104 
105  protected:
109 
114  virtual osgEarth::FeatureModelGraph* findFeatureModelGraph(osgEarth::MapNode* mapNode,
115  osgEarth::ModelLayer* modelLayer);
116 
119  virtual void getIntersectTileInModelLayer(int lod, std::vector<osgEarth::TileKey>& tiles, const osgEarth::Profile* profile);
120 
121  //return 0 if not found
122  const osgEarth::Profile* getProfileForModelGraph(osgEarth::FeatureModelGraph* graph);
123 
124  protected:
125  const osgEarth::Profile* myProfile;
126  std::vector< osgEarth::GeoExtent > myExtents;
127  std::vector< osgEarth::GeoExtent > myLastExtents;
136  //modelLayer name->tile keys intersect in model layer
137  std::map<std::string, std::vector<osgEarth::TileKey> > myIntersectTilesMap;
138  };
139 
143  : public DtVirtualBaseClass
144  {
145  public:
146  static DtOsgEarthCacheEstimatorCreator& instance(DtDe& de);
147  static void registerInstance(DtDe& de, DtOsgEarthCacheEstimatorCreator* creator);
148  virtual DtOsgEarthCacheEstimator* create() const;
149  };
150 }
Virtual base class.
Definition: DtVirtualBaseClass.h:19
Creator for the DtOsgEarthCacheEstimator.
Definition: DtOsgEarthCacheEstimator.h:142
double mySizeInMBPerTile
Definition: DtOsgEarthCacheEstimator.h:130
std::vector< osgEarth::GeoExtent > myExtents
Definition: DtOsgEarthCacheEstimator.h:126
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
int myNumOfTiles
Definition: DtOsgEarthCacheEstimator.h:132
DtOsgEarthCacheEstimator - Modified version of OsgEarthCacheEstimator add model layer cache estimatio...
Definition: DtOsgEarthCacheEstimator.h:36
bool mySkipModelLayers
Definition: DtOsgEarthCacheEstimator.h:135
int myLowestLOD
Definition: DtOsgEarthCacheEstimator.h:128
double myTimeInSecondsPerTile
Definition: DtOsgEarthCacheEstimator.h:131
Contains makVrv::DtVirtualBaseClass class.
bool mySkipImageLayers
Definition: DtOsgEarthCacheEstimator.h:133
const osgEarth::Profile * myProfile
Definition: DtOsgEarthCacheEstimator.h:125
bool mySkipElevationLayers
Definition: DtOsgEarthCacheEstimator.h:134
int myHighestLOD
Definition: DtOsgEarthCacheEstimator.h:129
std::map< std::string, std::vector< osgEarth::TileKey > > myIntersectTilesMap
Definition: DtOsgEarthCacheEstimator.h:137
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
DT_DLL_vrfutil bool intersects(const DtVector &localPoint1, const DtVector &localPoint2, const DtLocalVertexList &localVertexList, const Coordinate_System &coordinateSystem)
Returns true if the line segment localPoint1-localPoint2 intersects.
std::vector< osgEarth::GeoExtent > myLastExtents
Definition: DtOsgEarthCacheEstimator.h:127
Contains DLL export macros.

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)