VR-Forces 4.3.1 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
27
class
DT_DLL_vantageTerrainImplementation
DtMaintainMatrixVisitor
:
public
osg::NodeVisitor
28
{
29
public
:
30
using
osg::NodeVisitor::apply;
31
32
DtMaintainMatrixVisitor
();
33
explicit
DtMaintainMatrixVisitor
(
const
osg::Matrix&);
34
35
virtual
void
apply(osg::Transform& node);
36
37
protected
:
42
virtual
osg::BoundingSphere worldRefNodeBounds(osg::Node& node);
43
44
protected
:
45
osg::Matrix
myMatrix
;
46
};
47
52
class
DT_DLL_vantageTerrainImplementation
DtPageInVisitor
:
public
DtMaintainMatrixVisitor
53
{
54
public
:
55
using
DtMaintainMatrixVisitor::apply
;
56
57
DtPageInVisitor
();
58
explicit
DtPageInVisitor
(
const
osg::Matrix&);
59
virtual
void
apply
(osg::LOD& node);
60
virtual
void
apply
(osg::PagedLOD& node);
61
62
struct
NodePagingRecord
63
{
64
osg::ref_ptr<osg::Node>
node
;
65
osg::Matrix
matrix
;
66
std::string
filename
;
67
68
NodePagingRecord
() { }
69
NodePagingRecord
(
70
osg::Node* node,
const
osg::Matrix& matrix,
const
std::string& file)
71
: node(node), matrix(matrix), filename(file) { }
72
};
73
74
typedef
std::vector<NodePagingRecord>
NodePagingRecords
;
75
76
const
NodePagingRecords
&
pagedInNodes
()
const
{
return
myPagedInNodes; }
77
78
protected
:
82
virtual
bool
requiresPageIn(
const
osg::BoundingSphere&);
83
84
NodePagingRecords
myPagedInNodes
;
85
};
86
89
class
DT_DLL_vantageTerrainImplementation
DtGeometryPageInVisitor
:
public
DtPageInVisitor
90
{
91
public
:
92
DtGeometryPageInVisitor
(
const
DtTerrainPagingGeometryPtr
geometry);
93
DtGeometryPageInVisitor
(
DtTerrainPagingGeometryPtr
geometry,
const
osg::Matrix&);
94
95
protected
:
96
virtual
bool
requiresPageIn
(
const
osg::BoundingSphere&);
97
98
DtTerrainPagingGeometryPtr
myGeometry
;
99
};
100
102
class
DT_DLL_vantageTerrainImplementation
DtInspectorVisitor
:
public
DtMaintainMatrixVisitor
103
{
104
public
:
105
using
DtMaintainMatrixVisitor::apply
;
106
107
DtInspectorVisitor
();
108
virtual
void
apply
(osg::Node& node);
109
virtual
void
apply
(osg::Group& node);
110
virtual
void
apply
(osg::Geode& node);
111
virtual
void
apply
(osg::LOD& node);
112
virtual
void
apply
(osg::PagedLOD& node);
113
//virtual void apply(osg::CoordinateSystemNode& node);
114
115
protected
:
116
virtual
std::string indent();
117
virtual
std::string printBoundingInfo(osg::Node& node);
118
119
int
myIndentLevel
;
120
int
myChildNumber
;
121
protected
:
122
};
123
125
class
DT_DLL_vantageTerrainImplementation
DtDrawBoundingSpheresVisitor
:
public
DtMaintainMatrixVisitor
126
{
127
public
:
128
using
DtMaintainMatrixVisitor::apply
;
129
130
DtDrawBoundingSpheresVisitor
(
btIDebugDraw
* debugDrawer,
const
DtChord& chord);
131
132
virtual
void
apply
(osg::Group& node);
133
134
protected
:
135
btIDebugDraw
*
myDebugDrawer
;
136
DtChord
myTestChord
;
137
};
138
140
142
class
DT_DLL_vantageTerrainImplementation
DtTerrainIsPagingVisitor
:
public
osg::NodeVisitor
143
{
144
public
:
145
using
osg::NodeVisitor::apply;
146
147
DtTerrainIsPagingVisitor
();
148
virtual
~
DtTerrainIsPagingVisitor
();
149
151
virtual
void
apply(osg::PagedLOD& node);
152
154
virtual
const
bool
& encounteredPagedLod()
const
;
155
156
protected
:
157
159
bool
myEncounteredPagedLod
;
160
};
Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)