Changeset 369 for trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h
- Timestamp:
- 11/02/05 17:45:25 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.h
r367 r369 23 23 public: 24 24 enum RayType { LOCAL_RAY, GLOBAL_RAY, LINE_SEGMENT }; 25 25 26 26 enum { NO_INTERSECTION=0, INTERSECTION_OUT_OF_LIMITS, INTERSECTION }; 27 27 … … 36 36 // can be either mesh or a viewcell 37 37 Intersectable *mObject; 38 38 39 39 // the face of the intersectable 40 40 int mFace; 41 41 42 42 Intersection(const float t, 43 Intersectable *object,44 const int face):mT(t), mObject(object), mFace(face) {}45 43 Intersectable *object, 44 const int face):mT(t), mObject(object), mFace(face) {} 45 46 46 Intersection() {} 47 47 48 48 bool operator<( 49 49 const Intersection &b) const { 50 50 return 51 mT52 <53 b.mT;51 mT 52 < 53 b.mT; 54 54 } 55 55 … … 70 70 Ray(const Vector3 &wherefrom, 71 71 const Vector3 &whichdir, 72 const int _type, 73 const void *_originCell = NULL) { 72 const int _type) { 74 73 loc = wherefrom; 75 74 if (_type == LINE_SEGMENT) … … 94 93 // Inititalize the ray again when already constructed 95 94 void Init(const Vector3 &wherefrom, 96 97 98 95 const Vector3 &whichdir, 96 const int _type, 97 bool dirNormalized = false) { 99 98 loc = wherefrom; 100 99 dir = (dirNormalized || _type == LINE_SEGMENT) ? whichdir: Normalize(whichdir) ; … … 252 251 int mRays; 253 252 int mContributions; 254 PassingRaySet() { 253 254 PassingRaySet() { 255 255 Reset(); 256 256 } 257 void 257 258 void 258 259 Reset(); 259 260 260 261 void AddRay(const Ray &ray, const int contributions); 262 void AddRay2(const Ray &ray, 263 const int objects, 264 const int viewcells); 265 261 266 int GetEntryIndex(const Vector3 &direction) const; 262 267
Note: See TracChangeset
for help on using the changeset viewer.