VR-Forces 4.10 Class Documentation
 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) 2010 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
16 
17 #include <osg/Vec3>
18 #include <osg/NodeVisitor>
19 #include <geometry/chord.h>
20 #include <list>
21 #include <geometry/sphere.h>
22 
23 class Coordinate_System;
24 
25 namespace osgDB
26 {
27  class Options;
28  class MatrixTransform;
29 }
30 
31 namespace osgEarth
32 {
33  namespace Contrib
34  {
35  namespace ThreeDTiles
36  {
37  class ThreeDTileNode;
38  class ThreeDTilesetNode;
39  class ThreeDTilesetContentNode;
40  }
41  }
42 }
46 {
47 public:
48  using osg::NodeVisitor::apply;
49 
51  explicit DtMaintainMatrixVisitor(const osg::Matrix&);
52 
53  virtual void apply(osg::Transform& node);
54 
55 protected:
60  virtual osg::BoundingSphere worldRefNodeBounds(osg::Node& node);
61 
62 protected:
63  osg::Matrix myMatrix;
64 };
65 
71 {
72 public:
74 
76  explicit DtPageInVisitor(const osg::Matrix&);
77  virtual void apply(osg::LOD& node);
78  virtual void apply(osg::PagedLOD& node);
79 
80 
82  {
84  osg::Matrix matrix;
85  std::string filename;
86  bool valid;
87 
89  osg::Node* n, const osg::Matrix& matrix, const std::string& file, bool val)
90  : node(n), matrix(matrix), filename(file), valid(val)
91  {
92  }
93  };
94 
95  typedef std::vector<NodePagingRecord> NodePagingRecords;
96 
97  const NodePagingRecords& pagedInNodes() const { return myPagedInNodes; }
98 
99 protected:
103  virtual bool requiresPageIn(const osg::BoundingSphere&);
104 
109  virtual osg::Node* getNode(const std::string& filepath, const osgDB::Options*, bool& valid);
110 
113  virtual bool shouldExit() const;
114 
116 };
117 
121 {
122 public:
124  DtGeometryPageInVisitor(const Coordinate_System* cs, DtTerrainPagingGeometryPtr geometry, const osg::Matrix&);
125 
126 protected:
127  virtual bool requiresPageIn(const osg::BoundingSphere&);
128 
131 };
132 
135 {
136 public:
138 
140  virtual void apply(osg::Node& node);
141  virtual void apply(osg::Group& node);
142  virtual void apply(osg::Geode& node);
143  virtual void apply(osg::LOD& node);
144  virtual void apply(osg::PagedLOD& node);
145  //virtual void apply(osg::CoordinateSystemNode& node);
146 
147 protected:
148  virtual std::string indent();
149  virtual std::string printBoundingInfo(osg::Node& node);
150 
153 protected:
154 };
155 
157 
160 {
161 public:
162  using osg::NodeVisitor::apply;
163 
165  virtual ~DtTerrainIsPagingVisitor();
166 
168  virtual void apply(osg::PagedLOD& node);
169 
171  virtual const bool& encounteredPagedLod() const;
172 
173 protected:
174 
177 };
178 
180 
183 {
184 public:
185  using osg::NodeVisitor::apply;
186 
188  virtual ~DtTerrainIsThreeDTileVisitor();
189 
191  virtual void apply(osg::Group& node);
192 
194  virtual const bool& encounteredThreeDTile() const;
195 
196 protected:
197 
200 };
bool valid
Definition: pageInVisitor.h:86
osg::Matrix myMatrix
Definition: pageInVisitor.h:63
DtBoost::shared_ptr< DtTerrainPagingGeometry > DtTerrainPagingGeometryPtr
Definition: terrainPagingGeometry.h:46
Definition: pageInVisitor.h:81
int myChildNumber
Definition: pageInVisitor.h:152
std::vector< NodePagingRecord > NodePagingRecords
Definition: pageInVisitor.h:95
NodePagingRecords myPagedInNodes
Definition: pageInVisitor.h:115
osg::Matrix matrix
Definition: pageInVisitor.h:84
std::string filename
Definition: pageInVisitor.h:85
Visitor which maintains myMatrix as the current offset matrix though all transform nodes...
Definition: pageInVisitor.h:45
bool myEncounteredThreeDTile
Whether or not the visitor has yet encountered a paged lod node.
Definition: pageInVisitor.h:199
bool myEncounteredPagedLod
Whether or not the visitor has yet encountered a paged lod node.
Definition: pageInVisitor.h:176
Visitor that tracks whether any part of the terrain is paging.
Definition: pageInVisitor.h:182
int myIndentLevel
Definition: pageInVisitor.h:151
Subclass of DtPageInVisitor which pages in only nodes that fall along a particular geometry...
Definition: pageInVisitor.h:120
Definition: coordSystem.h:54
Definition: pageInVisitor.h:134
const NodePagingRecords & pagedInNodes() const
Definition: pageInVisitor.h:97
NodePagingRecord(osg::Node *n, const osg::Matrix &matrix, const std::string &file, bool val)
Definition: pageInVisitor.h:88
OSG Visitor class which pages the highest level of detail of paged LOD nodes in.
Definition: pageInVisitor.h:70
A DtChord is a finite line segment in 3-space, represented by two points.
osg::ref_ptr< osg::Node > node
Definition: pageInVisitor.h:83
#define DT_DLL_vantageTerrainImplementation
This file is used to determine how to build.
Definition: vantageTerrainImplementationDefines.h:28
virtual void apply(osg::Transform &node)
const Coordinate_System * myCoordinateSystem
Definition: pageInVisitor.h:130
Visitor that tracks whether any part of the terrain is paging.
Definition: pageInVisitor.h:159
DtTerrainPagingGeometryPtr myGeometry
Definition: pageInVisitor.h:129
virtual bool requiresPageIn(const osg::BoundingSphere &)

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)