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
vrfobjcore
vrfObjectIntersectionRecord.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2005 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
/******************************************************************************
6
** $RCSfile: vrfObjectIntersectionRecord.h,v $ $Revision: 1.2 $ $State: Exp $
7
******************************************************************************/
8
#ifndef vrfObjectIntersectionRecord_H_
9
#define vrfObjectIntersectionRecord_H_
10
14
17
18
#include "geometry/point.h"
19
#include "geometry/surface.h"
20
#include <assert.h>
21
22
class
DtVrfObject
;
23
27
#include "
vrfobjcore/vrfobjcoreDefines.h
"
28
class
DT_DLL_vrfobjcore
DtVrfObjectIntersectionRecord
29
{
30
public
:
31
DtVrfObjectIntersectionRecord
();
32
33
DtVrfObjectIntersectionRecord
(DtPoint& intersectionPoint,
34
double
intersectionTime,
const
DtSurface& surface,
DtVrfObject
* intersectedObject);
35
36
virtual
~
DtVrfObjectIntersectionRecord
();
37
41
42
//accessor/mutator functions
44
bool
intersectionFound()
const
;
45
void
setIntersectionFound(
bool
arg);
46
47
//set/get intersectionPoint
48
const
DtPoint intersectionPoint()
const
;
49
void
setIntersectionPoint(
const
DtPoint& pt);
50
51
//set/get intersectionTime
52
const
double
intersectionTime()
const
;
53
void
setIntersectionTime(
double
t);
54
55
//set/get intersecting surface
56
const
DtSurface surface()
const
;
57
void
setSurface(
const
DtSurface& s);
58
60
DtVrfObject
* intersectedVrfObject();
61
const
DtVrfObject
* intersectedVrfObject()
const
;
62
void
setIntersectedVrfObject(
DtVrfObject
* vrfObj);
63
69
inline
unsigned
int
numberOfIntersectionTests()
const
;
71
inline
void
incrementNumberOfIntersectionTests();
73
inline
void
setNumberOfIntersectionTests(
unsigned
int
newNumberOfTests);
75
76
protected
:
77
bool
testInvariant()
const
;
78
79
private
:
80
81
bool
myIntersectionFound
;
82
DtPoint
myIntersectionPoint
;
83
double
myIntersectionTime
;
84
DtSurface
mySurface
;
85
86
DtVrfObject
*
myIntersectedVrfObject
;
87
92
unsigned
int
myNumberOfIntersectionTests
;
93
};
94
95
96
inline
bool
DtVrfObjectIntersectionRecord::intersectionFound
()
const
97
{
98
assert(
testInvariant
());
99
return
myIntersectionFound
;
100
}
101
102
inline
void
DtVrfObjectIntersectionRecord::setIntersectionFound
(
bool
yesOrNo)
103
{
104
assert(
testInvariant
());
105
myIntersectionFound
= yesOrNo;
106
assert(
testInvariant
());
107
}
108
109
inline
const
DtPoint
DtVrfObjectIntersectionRecord::intersectionPoint
()
const
110
{
111
assert(
testInvariant
());
112
return
myIntersectionPoint
;
113
}
114
115
inline
void
DtVrfObjectIntersectionRecord::setIntersectionPoint
(
116
const
DtPoint& newPoint)
117
{
118
assert(
testInvariant
());
119
myIntersectionPoint
= newPoint;
120
assert(
testInvariant
());
121
}
122
123
inline
const
double
DtVrfObjectIntersectionRecord::intersectionTime
()
const
124
{
125
assert(
testInvariant
());
126
return
myIntersectionTime
;
127
}
128
129
inline
void
DtVrfObjectIntersectionRecord::setIntersectionTime
(
double
newTime)
130
{
131
assert(
testInvariant
());
132
myIntersectionTime
= newTime;
133
assert(
testInvariant
());
134
}
135
136
inline
const
DtSurface
DtVrfObjectIntersectionRecord::surface
()
const
137
{
138
assert(
testInvariant
());
139
return
mySurface
;
140
}
141
142
inline
void
DtVrfObjectIntersectionRecord::setSurface
(
const
DtSurface& newSurface)
143
{
144
assert(
testInvariant
());
145
mySurface
= newSurface;
146
assert(
testInvariant
());
147
}
148
149
inline
DtVrfObject
*
DtVrfObjectIntersectionRecord::intersectedVrfObject
()
150
{
151
assert(
testInvariant
());
152
return
myIntersectedVrfObject
;
153
}
154
inline
const
DtVrfObject
*
DtVrfObjectIntersectionRecord::intersectedVrfObject
()
const
155
{
156
assert(
testInvariant
());
157
return
myIntersectedVrfObject
;
158
}
159
160
inline
void
DtVrfObjectIntersectionRecord::setIntersectedVrfObject
(
DtVrfObject
* vrfObject)
161
{
162
assert(
testInvariant
());
163
myIntersectedVrfObject
= vrfObject;
164
assert(
testInvariant
());
165
}
166
167
inline
unsigned
int
DtVrfObjectIntersectionRecord::numberOfIntersectionTests
()
const
168
{
169
assert(
testInvariant
());
170
return
myNumberOfIntersectionTests
;
171
}
172
173
inline
void
DtVrfObjectIntersectionRecord::incrementNumberOfIntersectionTests
()
174
{
175
assert(
testInvariant
());
176
++
myNumberOfIntersectionTests
;
177
assert(
testInvariant
());
178
}
179
180
inline
void
DtVrfObjectIntersectionRecord::setNumberOfIntersectionTests
(
unsigned
int
newNumberOfTests)
181
{
182
assert(
testInvariant
());
183
myNumberOfIntersectionTests
= newNumberOfTests;
184
assert(
testInvariant
());
185
}
186
187
#endif
188
189
190
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
)