VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vantageTerrainImplementation
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
13
#include <
vantageTerrainImplementation/vantageTerrainImplementationDefines.h
>
14
15
#include <
terrainInterface/terrainPagingGeometry.h
>
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
33
class
DT_DLL_vantageTerrainImplementation
DtMaintainMatrixVisitor
:
public
osg::NodeVisitor
34
{
35
public
:
36
using
osg::NodeVisitor::apply;
37
38
DtMaintainMatrixVisitor
();
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
58
class
DT_DLL_vantageTerrainImplementation
DtPageInVisitor
:
public
DtMaintainMatrixVisitor
59
{
60
public
:
61
using
DtMaintainMatrixVisitor::apply
;
62
63
DtPageInVisitor
();
64
explicit
DtPageInVisitor
(
const
osg::Matrix&);
65
virtual
void
apply
(osg::LOD& node);
66
virtual
void
apply
(osg::PagedLOD& node);
67
68
struct
NodePagingRecord
69
{
70
osg::ref_ptr<osg::Node>
node
;
71
osg::Matrix
matrix
;
72
std::string
filename
;
73
74
NodePagingRecord
() { }
75
NodePagingRecord
(
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
98
NodePagingRecords
myPagedInNodes
;
99
};
100
103
class
DT_DLL_vantageTerrainImplementation
DtGeometryPageInVisitor
:
public
DtPageInVisitor
104
{
105
public
:
106
DtGeometryPageInVisitor
(
const
Coordinate_System
* cs,
const
DtTerrainPagingGeometryPtr
geometry);
107
DtGeometryPageInVisitor
(
const
Coordinate_System
* cs,
DtTerrainPagingGeometryPtr
geometry,
const
osg::Matrix&);
108
109
protected
:
110
virtual
bool
requiresPageIn
(
const
osg::BoundingSphere&);
111
112
DtTerrainPagingGeometryPtr
myGeometry
;
113
const
Coordinate_System
*
myCoordinateSystem
;
114
};
115
117
class
DT_DLL_vantageTerrainImplementation
DtInspectorVisitor
:
public
DtMaintainMatrixVisitor
118
{
119
public
:
120
using
DtMaintainMatrixVisitor::apply
;
121
122
DtInspectorVisitor
();
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
134
int
myIndentLevel
;
135
int
myChildNumber
;
136
protected
:
137
};
138
140
class
DT_DLL_vantageTerrainImplementation
DtDrawBoundingSpheresVisitor
:
public
DtMaintainMatrixVisitor
141
{
142
public
:
143
using
DtMaintainMatrixVisitor::apply
;
144
145
DtDrawBoundingSpheresVisitor
(
const
Coordinate_System
*,
btIDebugDraw
* debugDrawer,
const
DtChord
& chord);
146
147
virtual
void
apply
(osg::Group& node);
148
149
protected
:
150
btIDebugDraw
*
myDebugDrawer
;
151
DtChord
myTestChord
;
152
const
Coordinate_System
*
myCoordinateSystem
;
153
};
154
156
158
class
DT_DLL_vantageTerrainImplementation
DtTerrainIsPagingVisitor
:
public
osg::NodeVisitor
159
{
160
public
:
161
using
osg::NodeVisitor::apply;
162
163
DtTerrainIsPagingVisitor
();
164
virtual
~
DtTerrainIsPagingVisitor
();
165
167
virtual
void
apply(osg::PagedLOD& node);
168
170
virtual
const
bool
& encounteredPagedLod()
const
;
171
172
protected
:
173
175
bool
myEncounteredPagedLod
;
176
};
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)