VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
threeDTileTerrainSourcePager.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
10 
12 
17 
18 #include <set>
19 
20 namespace osgEarth
21 {
22  namespace Contrib
23  {
24  namespace ThreeDTiles
25  {
26  class ThreeDTileNode;
27  class ThreeDTilesetNode;
28  class ThreeDTilesetContentNode;
29  class Tile;
30  }
31  }
32 }
33 namespace osgDb
34 {
35  class Options;
36 }
37 
41 {
42 public:
43  typedef std::map<std::string, NodePagingRecord> NodePagingRecordMap;
44 
46  DtThreeDTileTerrainSourcePager(DtVantageTerrainEngine* terrainEngine, osg::Group* rootNode, makVrf::DtSurfaceCharacteristicMapConstPtr surfaceCharacterMap);
47 
49  virtual ~DtThreeDTileTerrainSourcePager() override;
50 
53 
55  virtual bool pageInGeometry(
56  const DtTerrainPagingGeometryPtr geometry, DtTerrainIntersectIDType intersectId = 0) override;
57 
59  virtual bool pageOutNodes(std::list<DtNodeId>& nodesToRemove) override;
60 
62  virtual void updatePageTracker(DtTerrainIntersectIDType intersectId = 0) override;
63 
65  virtual const NodePagingRecordMap& pagedInNodes() const;
66 
67  virtual DtString type() const override;
68 
71  static DtTerrainSourcePager* terrainChooserFunction(osg::Node& node, DtVantageTerrainEngine* terrainEngine, makVrf::DtSurfaceCharacteristicMapConstPtr surfaceCharacterMap);
72 
73 protected:
75  osg::Node* terrainRoot();
76 
77 protected:
80  {
81  public:
83 
84  explicit DtActivePageVisitor(const NodePagingRecordMap&, float geometricError, DtTerrainIntersectIDType intersectId = 0);
85 
86  virtual void apply(osg::Group& node) override;
87 
88  protected:
90  virtual void findPageInPageOutBounds(const osgEarth::Contrib::ThreeDTiles::Tile* tile, const osgDB::Options* options);
92  virtual void findPageInPageOutSub(const osgEarth::Contrib::ThreeDTiles::Tile* tile);
93  private:
96  };
97 
100  osg::Matrix myMatrix;
101 
104 
106 
112 
113 };
114 
NodePagingRecordMap myPagedInNodes
Holds all the nodes which have been paged in.
Definition: threeDTileTerrainSourcePager.h:103
std::shared_ptr< const DtSurfaceCharacteristicMap > DtSurfaceCharacteristicMapConstPtr
Definition: surfaceCharacteristicsMap.h:36
virtual void apply(osg::Transform &node) override
DtThreeDTileTerrainSourcePager is a derived terrainSourcePager that handles a source such as 3d tile...
Definition: threeDTileTerrainSourcePager.h:39
float myGeometricError
Definition: threeDTileTerrainSourcePager.h:95
virtual bool pageOutNodes(std::list< DtNodeId > &nodesToRemove)=0
This function must cause the page out of the nodeIds specified. It should return true when successful...
DtTerrainSourcePager is the base class for terrain pagers. There will be one terrainSourcePager per t...
Definition: terrainSourcePager.h:56
const NodePagingRecordMap & myPagedInNodes
Definition: threeDTileTerrainSourcePager.h:94
osg::Matrix myMatrix
Definition: threeDTileTerrainSourcePager.h:100
unsigned long long DtTerrainIntersectIDType
Definition: terrainInterfaceDefines.h:28
virtual DtString type() const =0
virtual DtTerrainSourceTracker * createTerrainSourceTracker(DtVantageTerrainEngine *)=0
Creates and returns a DtTerrainSourceTracker.
Visitor class used to find the active paged of a OSG scene graph.
Definition: threeDTileTerrainSourcePager.h:79
std::shared_ptr< DtTerrainPagingGeometry > DtTerrainPagingGeometryPtr
Definition: terrainPagingGeometry.h:46
std::map< std::string, NodePagingRecord > NodePagingRecordMap
Definition: threeDTileTerrainSourcePager.h:43
Visitor class used to find the active paged of a OSG scene graph.
Definition: boundingVolumeTerrainSourcePager.h:48
Base class for Terrain Source trackers. Determines if the necessary data To perform an intersection i...
Definition: terrainSourceTracker.h:75
virtual bool pageInGeometry(const DtTerrainPagingGeometryPtr geometry, DtTerrainIntersectIDType intersectId=0)=0
This function must page in all the geometry specified by the argument, and return true when successfu...
float myGeometricError
3Dtile geometric error (set this in the earth file with &lt;ThreeDTiles vrfsim:geometricError=2.0&gt; it will limit the resolution of the geometry loaded if you don&#39;t set it -1 (it will load everything) set to a value from 0.01 to 15.0
Definition: threeDTileTerrainSourcePager.h:111
makVrf::DtSurfaceCharacteristicMapConstPtr mySurfaceCharacterMap
Definition: threeDTileTerrainSourcePager.h:105
DtBoundingVolumeTerrainSourcePager is a derived terrainSourcePager that handles a source such as meta...
Definition: boundingVolumeTerrainSourcePager.h:21
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
virtual void updatePageTracker(DtTerrainIntersectIDType intersectId=0) override=0
This class wraps the VR-Vantage Display Engine, and uses as a terrain loader and intersector. This is the terrain engine that powers the DtVantageTerrainImplementation. The DtVantageTerrainEngine runs the DtDe it its own thread, and processes commands thought the command queue.
Definition: vantageTerrainEngine.h:112
osg::ref_ptr< osg::Node > myRootNode
The node on which this pager operates.
Definition: threeDTileTerrainSourcePager.h:99

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)