VR-Forces 4.7 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 }
29 
33 {
34 public:
35  using osg::NodeVisitor::apply;
36 
38  explicit DtMaintainMatrixVisitor(const osg::Matrix&);
39 
40  virtual void apply(osg::Transform& node);
41 
42 protected:
47  virtual osg::BoundingSphere worldRefNodeBounds(osg::Node& node);
48 
49 protected:
50  osg::Matrix myMatrix;
51 };
52 
58 {
59 public:
61 
63  explicit DtPageInVisitor(const osg::Matrix&);
64  virtual void apply(osg::LOD& node);
65  virtual void apply(osg::PagedLOD& node);
66 
68  {
69  osg::ref_ptr<osg::Node> node;
70  osg::Matrix matrix;
71  std::string filename;
72  bool valid;
73 
75  osg::Node* n, const osg::Matrix& matrix, const std::string& file, bool val)
76  : node(n), matrix(matrix), filename(file), valid(val)
77  {
78  }
79  };
80 
81  typedef std::vector<NodePagingRecord> NodePagingRecords;
82 
83  const NodePagingRecords& pagedInNodes() const { return myPagedInNodes; }
84 
85 protected:
89  virtual bool requiresPageIn(const osg::BoundingSphere&);
90 
95  virtual osg::Node* getNode(const std::string& filepath, const osgDB::Options*, bool& valid);
96 
99  virtual bool shouldExit() const;
100 
102 };
103 
107 {
108 public:
110  DtGeometryPageInVisitor(const Coordinate_System* cs, DtTerrainPagingGeometryPtr geometry, const osg::Matrix&);
111 
112 protected:
113  virtual bool requiresPageIn(const osg::BoundingSphere&);
114 
117 };
118 
121 {
122 public:
124 
126  virtual void apply(osg::Node& node);
127  virtual void apply(osg::Group& node);
128  virtual void apply(osg::Geode& node);
129  virtual void apply(osg::LOD& node);
130  virtual void apply(osg::PagedLOD& node);
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 protected:
140 };
141 
143 
146 {
147 public:
148  using osg::NodeVisitor::apply;
149 
151  virtual ~DtTerrainIsPagingVisitor();
152 
154  virtual void apply(osg::PagedLOD& node);
155 
157  virtual const bool& encounteredPagedLod() const;
158 
159 protected:
160 
163 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)