VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
pageInVisitor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
16 #include <vlutil/vlPrint.h>
17 
18 #include <osg/Vec3>
19 #include <osg/NodeVisitor>
20 #include <geometry/chord.h>
21 #include <list>
22 #include <geometry/sphere.h>
23 
24 class Coordinate_System;
25 
26 namespace osgDB
27 {
28  class Options;
29  class MatrixTransform;
30 }
31 
32 namespace osgEarth
33 {
34  namespace Contrib
35  {
36  namespace ThreeDTiles
37  {
38  class ThreeDTileNode;
39  class ThreeDTilesetNode;
40  class ThreeDTilesetContentNode;
41  }
42  }
43 }
47 {
48 public:
49  using osg::NodeVisitor::apply;
50 
52  explicit DtMaintainMatrixVisitor(const osg::Matrix&);
53 
54  virtual void apply(osg::Transform& node) override;
55 
56 protected:
61  virtual osg::BoundingSphere worldRefNodeBounds(osg::Node& node);
62 
63 protected:
64  osg::Matrix myMatrix;
65 };
66 
72 {
73 public:
75 
77  explicit DtPageInVisitor(const osg::Matrix&);
78  virtual void apply(osg::LOD& node) override;
79  virtual void apply(osg::PagedLOD& node) override;
80 
81  const NodePagingRecords& pagedInNodes() const { return myPagedInNodes; }
82 
83 protected:
87  virtual bool requiresPageIn(const osg::BoundingSphere&);
88 
93  virtual osg::Node* getNode(const std::string& filepath, const osgDB::Options*, bool& valid);
94 
97  virtual bool shouldExit() const;
98 
100 };
101 
105 {
106 public:
108  DtGeometryPageInVisitor(const Coordinate_System* cs, DtTerrainPagingGeometryPtr geometry, const osg::Matrix&);
109 
110  DtTerrainPagingGeometryPtr getGeometry() { return myGeometry; };
111 protected:
112  virtual bool requiresPageIn(const osg::BoundingSphere&) override;
113 
116 };
117 
120 {
121 public:
123 
125  DtInspectorVisitor(DtOutputStream & os);
126  virtual void apply(osg::Node& node) override;
127  virtual void apply(osg::Group& node) override;
128  virtual void apply(osg::Geode& node) override;
129  virtual void apply(osg::LOD& node) override;
130  virtual void apply(osg::PagedLOD& node) override;
131  //virtual void apply(osg::CoordinateSystemNode& node);
132 
133 protected:
134  virtual std::string indent();
135  virtual std::string printBoundingInfo(osg::Node& node);
136 
139  DtOutputStream& myOutputStream;
140 protected:
141 };
142 
144 
147 {
148 public:
149  using osg::NodeVisitor::apply;
150 
152  virtual ~DtTerrainIsPagingVisitor() override;
153 
155  virtual void apply(osg::PagedLOD& node) override;
156 
158  virtual const bool& encounteredPagedLod() const;
159 
160 protected:
161 
164 };
165 
167 
170 {
171 public:
172  using osg::NodeVisitor::apply;
173 
175  virtual ~DtTerrainIsThreeDTileVisitor() override;
176 
178  virtual void apply(osg::Group& node) override;
179 
181  virtual const bool& encounteredThreeDTile() const;
182 
183 protected:
184 
187 };
osg::Matrix myMatrix
Definition: pageInVisitor.h:64
virtual void apply(osg::Transform &node) override
int myChildNumber
Definition: pageInVisitor.h:138
NodePagingRecords myPagedInNodes
Definition: pageInVisitor.h:99
Visitor which maintains myMatrix as the current offset matrix though all transform nodes...
Definition: pageInVisitor.h:46
std::vector< NodePagingRecord > NodePagingRecords
Definition: vantageTerrainImplementationUtil.h:102
DtOutputStream & myOutputStream
Definition: pageInVisitor.h:139
bool myEncounteredThreeDTile
Whether or not the visitor has yet encountered a paged lod node.
Definition: pageInVisitor.h:186
bool myEncounteredPagedLod
Whether or not the visitor has yet encountered a paged lod node.
Definition: pageInVisitor.h:163
Visitor that tracks whether any part of the terrain is a 3Dtile.
Definition: pageInVisitor.h:169
int myIndentLevel
Definition: pageInVisitor.h:137
Subclass of DtPageInVisitor which pages in only nodes that fall along a particular geometry...
Definition: pageInVisitor.h:104
Definition: coordSystem.h:54
Definition: pageInVisitor.h:119
const NodePagingRecords & pagedInNodes() const
Definition: pageInVisitor.h:81
std::shared_ptr< DtTerrainPagingGeometry > DtTerrainPagingGeometryPtr
Definition: terrainPagingGeometry.h:46
DtTerrainPagingGeometryPtr getGeometry()
Definition: pageInVisitor.h:110
OSG Visitor class which pages the highest level of detail of paged LOD nodes in. This is a base class...
Definition: pageInVisitor.h:71
A DtChord is a finite line segment in 3-space, represented by two points. Data derived from the two e...
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
const Coordinate_System * myCoordinateSystem
Definition: pageInVisitor.h:115
Visitor that tracks whether any part of the terrain is pagedLod.
Definition: pageInVisitor.h:146
DtTerrainPagingGeometryPtr myGeometry
Definition: pageInVisitor.h:114
virtual bool requiresPageIn(const osg::BoundingSphere &)

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)