VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
geometry
chord.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2005 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: chord.h,v $ $Revision: 1.13 $ $State: Exp $
7
*******************************************************************************/
8
#ifndef chord_H_
9
#define chord_H_
10
11
#include "
geometry/geometryDefines.h
"
12
#include "
geometry/point.h
"
13
#include "
geometry/tdbextent.h
"
14
15
21
23
39
40
class
DT_DLL_geometry
DtChord
41
{
42
public
:
44
DtChord
();
45
47
DtChord
(
const
DtPoint
& endpoint0,
const
DtPoint
& endpoint1);
48
50
virtual
~
DtChord
();
51
53
DtChord
(
const
DtChord
& orig);
54
56
DtChord
& operator=(
const
DtChord
& orig);
57
59
60
61
const
DtPoint
& endpoint0()
const
;
62
64
const
DtPoint
& endpoint1()
const
;
65
67
double
directedXComponent()
const
;
68
70
double
directedYComponent()
const
;
71
73
double
directedZComponent()
const
;
74
76
const
DtExtent
& extent()
const
;
78
81
virtual
DtPoint
computePoint(
const
double
t)
const
;
82
84
virtual
bool
isCollinear(
const
DtPoint
& p)
const
;
85
87
virtual
bool
parallelToXYPlane()
const
;
88
90
virtual
bool
inPlaneZEquals(
const
double
c)
const
;
91
95
virtual
bool
intersectsPlaneZEqualsAtPoint(
const
double
c,
96
double
& tvalue)
const
;
97
100
virtual
bool
collinearPointLiesWithin(
const
DtPoint
& pt)
const
;
101
102
// \return The length of the chord.
103
// \note Slower than lengthSquared().
104
double
length()
const
;
105
106
// \return The squared length of the chord.
107
double
lengthSquared()
const
;
108
109
protected
:
110
112
virtual
double
minZ()
const
;
113
115
virtual
double
maxZ()
const
;
116
117
public
:
118
//- -------------- deprecated access/manipulate routines -----------------
121
double
lengthOnX()
const
;
122
125
double
lengthOnY()
const
;
126
129
double
lengthOnZ()
const
;
130
131
//debugging aid
133
virtual
void
dump(
void
)
const
;
134
135
//- -------------- end deprecated access/manipulate routines -----------------
136
137
private
:
138
DtPoint
myFirstEndpoint
;
139
DtPoint
mySecondEndpoint
;
141
142
143
144
double
myA
;
//length of chord along x-axis
145
double
myB
;
//length of chord along y-axis
146
double
myC
;
//length of chord along z-axis
147
148
DtExtent
myExtent
;
150
};
151
152
153
inline
const
DtExtent
&
DtChord::extent
()
const
154
{
155
return
myExtent
;
156
}
157
158
inline
const
DtPoint
&
DtChord::endpoint0
()
const
159
{
160
return
myFirstEndpoint
;
161
}
162
163
inline
const
DtPoint
&
DtChord::endpoint1
()
const
164
{
165
return
mySecondEndpoint
;
166
}
167
168
inline
double
DtChord::directedXComponent
()
const
169
{
170
return
myA
;
171
}
172
173
inline
double
DtChord::directedYComponent
()
const
174
{
175
return
myB
;
176
}
177
178
inline
double
DtChord::directedZComponent
()
const
179
{
180
return
myC
;
181
}
182
//- -------------- deprecated access/manipulate routines -----------------
183
inline
double
DtChord::lengthOnX
()
const
184
{
185
return
myA
;
186
}
187
188
inline
double
DtChord::lengthOnY
()
const
189
{
190
return
myB
;
191
}
192
193
inline
double
DtChord::lengthOnZ
()
const
194
{
195
return
myC
;
196
}
197
//- -------------- end deprecated access/manipulate routines -----------------
198
199
#endif
200
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)