VR-Forces 4.1.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
geometry
tdbextent.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 1998 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: tdbextent.h,v $ $Revision: 1.17 $ $State: Exp $
7
*******************************************************************************/
8
#ifndef tdbextent_H_
9
#define tdbextent_H_
10
13
14
#include "
geometry/geometryDefines.h
"
15
#include "
geometry/point.h
"
16
#ifndef NO_VRLINK
17
#include <matrix/vlVector.h>
18
#endif
19
#include <iosfwd>
20
class
DtChord
;
21
class
DtSphere
;
22
42
43
class
DT_DLL_geometry
DtExtent
44
{
45
public
:
46
50
DtExtent
();
51
52
DtExtent
(
const
DtExtent
& orig);
53
54
57
DtExtent
(
const
double
minX,
const
double
maxX,
58
const
double
minY,
const
double
maxY,
59
const
double
minZ,
const
double
maxZ );
60
64
DtExtent
(
const
DtPoint
& p0,
const
DtPoint
& p1);
65
69
DtExtent
(
const
DtChord
& lineSeg);
70
71
virtual
~
DtExtent
();
72
73
DtExtent
& operator=(
const
DtExtent
& orig);
74
75
virtual
bool
operator==
(
const
DtExtent
& rhs)
const
;
76
virtual
bool
operator!=
(
const
DtExtent
& rhs)
const
;
77
78
//- -------------- access/manipulate size/shape routines -----------------
79
81
82
double
minX()
const
;
83
double
minY()
const
;
84
double
minZ()
const
;
85
double
maxX()
const
;
86
double
maxY()
const
;
87
double
maxZ()
const
;
88
89
void
setMinX(
double
x);
90
void
setMinY(
double
y);
91
void
setMinZ(
double
z);
92
void
setMaxX(
double
x);
93
void
setMaxY(
double
y);
94
void
setMaxZ(
double
z);
96
98
virtual
const
DtPoint
center()
const
;
99
101
virtual
void
setCenter(
const
DtPoint
& p);
102
104
virtual
void
setFromCenter(
const
DtPoint
& p,
105
const
double
& xDist,
106
const
double
& yDist,
107
const
double
& zDist);
108
109
111
112
double
xSize()
const
;
113
double
ySize()
const
;
114
double
zSize()
const
;
116
118
virtual
DtPoint
maxPoint()
const
;
119
121
virtual
DtPoint
minPoint()
const
;
122
126
bool
empty()
const
;
127
129
virtual
void
expandToInclude(
const
DtExtent
& otherExtent);
130
132
virtual
void
expandToInclude(
const
DtPoint
&
point
);
133
134
//- --------------- intersection tests ---------------------------
135
//- --- could be potentially moved to an DtExtentIntersector class ---
136
139
virtual
bool
contains(
const
DtExtent
& otherExtent)
const
;
140
143
virtual
bool
contains(
const
DtPoint
& point)
const
;
144
147
virtual
bool
contains(
const
DtChord
& chord)
const
;
148
151
bool
intersects
(
const
DtExtent
& otherExtent)
const
;
152
155
bool
doesNotIntersect(
const
DtExtent
& otherExtent)
const
;
156
158
bool
intersects
(
const
DtSphere
& sphere)
const
;
159
160
protected
:
161
167
bool
intersectsLineOfChord(
const
DtChord
& chord,
168
double
& distInChordLengthsFirst,
double
& distInChordLengthsLast)
const
;
169
180
bool
intersectsSoFar(
const
double
pointVal,
181
const
double
rayVal,
const
double
side0,
const
double
side1,
182
double
&firstTime,
double
&lastTime)
const
;
183
184
//- --------------- end intersection tests ---------------------------
185
186
protected
:
189
void
guaranteeValidConstruction();
190
191
protected
:
192
double
myMinX
;
193
double
myMaxX
;
194
double
myMinY
;
195
double
myMaxY
;
196
double
myMinZ
;
197
double
myMaxZ
;
198
199
public
:
200
202
static
DtExtent
& nullExtent();
203
204
};
205
206
#define tdbextent_inl
207
#include "geometry/tdbextent.inl"
208
#undef tdbextent_inl
209
210
DT_DLL_geometry
std::ostream&
operator<<
(std::ostream& os,
const
DtExtent
& extent);
211
DT_DLL_geometry
std::istream&
operator>>
(std::istream& is,
DtExtent
& extent);
212
213
#endif
214
Document ID: Generated on Mon Apr 8 19:24:01 EDT 2013 from SVN revision 125877
Copyright © 2005-2013 VT MÄK. All Rights Reserved (
www.mak.com
)