VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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 
76  osg::Node* node, const osg::Matrix& matrix, const std::string& file)
77  : node(node), matrix(matrix), filename(file) { }
78  };
79 
80  typedef std::vector<NodePagingRecord> NodePagingRecords;
81 
82  const NodePagingRecords& pagedInNodes() const { return myPagedInNodes; }
83 
84 protected:
88  virtual bool requiresPageIn(const osg::BoundingSphere&);
89 
92  virtual osg::Node* getNode(const std::string& filepath, const osgDB::Options*);
93 
96  virtual bool shouldExit() const;
97 
99 };
100 
104 {
105 public:
107  DtGeometryPageInVisitor(const Coordinate_System* cs, DtTerrainPagingGeometryPtr geometry, const osg::Matrix&);
108 
109 protected:
110  virtual bool requiresPageIn(const osg::BoundingSphere&);
111 
114 };
115 
118 {
119 public:
121 
123  virtual void apply(osg::Node& node);
124  virtual void apply(osg::Group& node);
125  virtual void apply(osg::Geode& node);
126  virtual void apply(osg::LOD& node);
127  virtual void apply(osg::PagedLOD& node);
128  //virtual void apply(osg::CoordinateSystemNode& node);
129 
130 protected:
131  virtual std::string indent();
132  virtual std::string printBoundingInfo(osg::Node& node);
133 
136 protected:
137 };
138 
141 {
142 public:
144 
145  DtDrawBoundingSpheresVisitor(const Coordinate_System*, btIDebugDraw* debugDrawer, const DtChord& chord);
146 
147  virtual void apply(osg::Group& node);
148 
149 protected:
153 };
154 
156 
159 {
160 public:
161  using osg::NodeVisitor::apply;
162 
164  virtual ~DtTerrainIsPagingVisitor();
165 
167  virtual void apply(osg::PagedLOD& node);
168 
170  virtual const bool& encounteredPagedLod() const;
171 
172 protected:
173 
176 };

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)