- Timestamp:
- 11/28/06 19:46:36 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/IntersectableWrapper.cpp
r1786 r1824 23 23 if (ray.GetType() == Ray::LOCAL_RAY && !ray.intersections.empty()) 24 24 nearestT = ray.intersections[0].mT; 25 25 26 26 const int hitCode = mItem.CastRay(ray, t, nearestT, nearestNormal); 27 27 28 28 nearestT = t; 29 29 30 if ((hitCode == Ray::INTERSECTION) && (ray.GetType() == Ray::LOCAL_RAY)) 31 { 32 if (!ray.intersections.empty()) 33 { 34 ray.intersections[0] = Ray::Intersection(nearestT, nearestNormal, this, 0); 30 if (hitCode == Ray::INTERSECTION) { 31 if (ray.GetType() == Ray::LOCAL_RAY && !ray.intersections.empty()) { 32 ray.intersections[0] = Ray::Intersection(nearestT, 33 nearestNormal, 34 this, 35 0); 35 36 } 36 else 37 { 38 ray.intersections.push_back(Ray::Intersection(nearestT, nearestNormal, this, 0)); 37 else { 38 ray.intersections.push_back(Ray::Intersection(nearestT, 39 nearestNormal, 40 this, 41 0)); 39 42 } 40 43 41 44 return 1; 42 45 } 43 46 44 47 return 0; 45 48 }
Note: See TracChangeset
for help on using the changeset viewer.