Changeset 1824 for GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h
- Timestamp:
- 11/28/06 19:46:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/Ray.h
r1594 r1824 3 3 4 4 #include <vector> 5 #include <algorithm> 5 6 #include "Matrix4x4.h" 6 7 #include "Vector3.h" … … 46 47 Intersectable *mObject; 47 48 48 /// the face of the intersectable49 /// the face of the intersectable 49 50 int mFace; 50 51 51 52 Intersection(const float t, 52 53 54 55 53 const Vector3 &normal, 54 Intersectable *object, 55 const int face): 56 mT(t), mNormal(normal), mObject(object), mFace(face) 56 57 {} 57 58 58 59 Intersection(): mT(0), mNormal(0,0,0), mObject(NULL), mFace(0) 59 60 {} 60 61 61 62 bool operator<(const Intersection &b) const 62 63 { … … 113 114 void Init(const VssRay &vssRay); 114 115 116 void SortIntersections() { 117 sort(intersections.begin(), intersections.end()); 118 } 119 115 120 Intersectable *GetIntersectionObject(const int i) const { 116 121 return intersections[i].mObject; … … 215 220 216 221 int GetType() const { return mType; } 222 void SetType(const int t) { mType = t; } 217 223 218 224 // make such operation to slightly change the ray direction … … 313 319 Vector3 mDirection; 314 320 float mPdf; 315 316 SimpleRay() {} 321 int mType; 322 323 SimpleRay(): mType(Ray::LOCAL_RAY) {} 317 324 SimpleRay(const Vector3 &o, const Vector3 &d, const float p=1.0f): 318 mOrigin(o), mDirection(d), mPdf(p) {}319 325 mOrigin(o), mDirection(d), mPdf(p), mType(Ray::LOCAL_RAY) {} 326 320 327 Vector3 Extrap(const float t) const { 321 328 return mOrigin + mDirection * t;
Note: See TracChangeset
for help on using the changeset viewer.