VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 
29 {
30 public:
32 
33  DtVrfObjectIntersectionRecord(DtPoint& intersectionPoint,
34  double intersectionTime, const DtSurface& surface, DtVrfObject* intersectedObject);
35 
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 
85 
87 
93 };
94 
95 
97 {
98  assert(testInvariant());
99  return myIntersectionFound;
100 }
101 
103 {
104  assert(testInvariant());
105  myIntersectionFound = yesOrNo;
106  assert(testInvariant());
107 }
108 
110 {
111  assert(testInvariant());
112  return myIntersectionPoint;
113 }
114 
116  const DtPoint& newPoint)
117 {
118  assert(testInvariant());
119  myIntersectionPoint = newPoint;
120  assert(testInvariant());
121 }
122 
124 {
125  assert(testInvariant());
126  return myIntersectionTime;
127 }
128 
130 {
131  assert(testInvariant());
132  myIntersectionTime = newTime;
133  assert(testInvariant());
134 }
135 
137 {
138  assert(testInvariant());
139  return mySurface;
140 }
141 
143 {
144  assert(testInvariant());
145  mySurface = newSurface;
146  assert(testInvariant());
147 }
148 
150 {
151  assert(testInvariant());
152  return myIntersectedVrfObject;
153 }
155 {
156  assert(testInvariant());
157  return myIntersectedVrfObject;
158 }
159 
161 {
162  assert(testInvariant());
163  myIntersectedVrfObject = vrfObject;
164  assert(testInvariant());
165 }
166 
168 {
169  assert(testInvariant());
171 }
172 
174 {
175  assert(testInvariant());
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 Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)