VR-Forces 4.6 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 btIDebugDraw;
24 class Coordinate_System;
25 
26 namespace osgDB
27 {
28  class Options;
29 }
30 
34 {
35 public:
36  using osg::NodeVisitor::apply;
37 
39  explicit DtMaintainMatrixVisitor(const osg::Matrix&);
40 
41  virtual void apply(osg::Transform& node);
42 
43 protected:
48  virtual osg::BoundingSphere worldRefNodeBounds(osg::Node& node);
49 
50 protected:
51  osg::Matrix myMatrix;
52 };
53 
59 {
60 public:
62 
64  explicit DtPageInVisitor(const osg::Matrix&);
65  virtual void apply(osg::LOD& node);
66  virtual void apply(osg::PagedLOD& node);
67 
69  {
70  osg::ref_ptr<osg::Node> node;
71  osg::Matrix matrix;
72  std::string filename;
73  bool valid;
74 
76  osg::Node* n, const osg::Matrix& matrix, const std::string& file, bool val)
77  : node(n), matrix(matrix), filename(file), valid(val)
78  {
79  }
80  };
81 
82  typedef std::vector<NodePagingRecord> NodePagingRecords;
83 
84  const NodePagingRecords& pagedInNodes() const { return myPagedInNodes; }
85 
86 protected:
90  virtual bool requiresPageIn(const osg::BoundingSphere&);
91 
96  virtual osg::Node* getNode(const std::string& filepath, const osgDB::Options*, bool& valid);
97 
100  virtual bool shouldExit() const;
101 
103 };
104 
108 {
109 public:
111  DtGeometryPageInVisitor(const Coordinate_System* cs, DtTerrainPagingGeometryPtr geometry, const osg::Matrix&);
112 
113 protected:
114  virtual bool requiresPageIn(const osg::BoundingSphere&);
115 
118 };
119 
122 {
123 public:
125 
127  virtual void apply(osg::Node& node);
128  virtual void apply(osg::Group& node);
129  virtual void apply(osg::Geode& node);
130  virtual void apply(osg::LOD& node);
131  virtual void apply(osg::PagedLOD& node);
132  //virtual void apply(osg::CoordinateSystemNode& node);
133 
134 protected:
135  virtual std::string indent();
136  virtual std::string printBoundingInfo(osg::Node& node);
137 
140 protected:
141 };
142 
145 {
146 public:
148 
149  DtDrawBoundingSpheresVisitor(const Coordinate_System*, btIDebugDraw* debugDrawer, const DtChord& chord);
150 
151  virtual void apply(osg::Group& node);
152 
153 protected:
157 };
158 
160 
163 {
164 public:
165  using osg::NodeVisitor::apply;
166 
168  virtual ~DtTerrainIsPagingVisitor();
169 
171  virtual void apply(osg::PagedLOD& node);
172 
174  virtual const bool& encounteredPagedLod() const;
175 
176 protected:
177 
180 };

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)