Changeset 639 for GTP/trunk/Lib/Vis/Preprocessing/src/RayInfo.cpp
- Timestamp:
- 02/14/06 17:13:42 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Vis/Preprocessing/src/RayInfo.cpp
r508 r639 106 106 mMaxT = t; 107 107 } 108 109 108 #endif 109 110 110 111 111 int RayInfo::ComputeRayIntersection(const int axis, const float position, float &t) const … … 133 133 { 134 134 t = splitPlane.FindT(mRay->GetOrigin(), mRay->GetTermination()); 135 // Debug << "t: " << t << " mint " << GetMinT() << " maxt " << GetMaxT() << 136 // " orig: " << mRay->GetOrigin() << " term " << mRay->GetTermination() << endl; 135 136 if (0) 137 Debug << "t: " << t << " mint " << GetMinT() << " maxt " << GetMaxT() 138 << " orig: " << mRay->GetOrigin() << " term " << mRay->GetTermination() << endl; 137 139 138 140 // NOTE: if plane equals end point of ray, the ray should be classified 139 141 // non-intersecting, otherwise polygon-plane intersections of bsp tree 140 142 // approaches are not eliminating any rays intersecting the polygon! 141 #if 1 142 if (t >= GetMaxT() - 1e-20) 143 const float thresh = 1 ? 1e-6f : 0.0f; 144 145 // segment is not intersecting plane: fond out if on front or back side 146 if (t >= GetMaxT() - thresh) 147 { 143 148 return splitPlane.Side(ExtrapOrigin()); 144 if (t <= GetMinT() + 1e-20) 149 } 150 151 if (t <= GetMinT() + thresh) 152 { 145 153 return splitPlane.Side(ExtrapTermination()); 146 #else 147 if (t > GetMaxT()) 148 return splitPlane.Side(ExtrapOrigin()); 149 else if (t < GetMinT()) 150 return splitPlane.Side(ExtrapTermination()); 151 #endif 154 } 155 152 156 return 0; 153 157 } 158 154 159 155 160 float RayInfo::SegmentLength() const
Note: See TracChangeset
for help on using the changeset viewer.