Changeset 406 for trunk/VUT/GtpVisibilityPreprocessor/src/Ray.cpp
- Timestamp:
- 11/11/05 21:28:02 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/VUT/GtpVisibilityPreprocessor/src/Ray.cpp
r369 r406 172 172 int 173 173 Ray::ClassifyPlane(const Plane3 &plane, 174 const float minT, 175 const float maxT) const 176 { 177 const Vector3 entp = Extrap(minT); 178 const Vector3 extp = Extrap(maxT); 179 180 const int entSide = plane.Side(entp); 181 const int extSide = plane.Side(extp); 174 const float minT, 175 const float maxT, 176 Vector3 &entP, 177 Vector3 &extP) const 178 { 179 entP = Extrap(minT); 180 extP = Extrap(maxT); 181 182 const int entSide = plane.Side(entP); 183 const int extSide = plane.Side(extP); 182 184 183 185 if (entSide < 0) 186 { 187 if (extSide >= 0) 184 188 { 185 if (extSide >= 0) 186 { 187 return BACK_FRONT; 188 } 189 return BACK; 189 return BACK_FRONT; 190 190 } 191 return BACK; 192 } 191 193 else if (entSide > 0) 192 193 194 194 { 195 if (extSide <= 0) 196 return FRONT_BACK; 195 197 196 197 198 return FRONT; 199 } 198 200 else if (entSide == 0) 199 200 201 202 203 204 201 { 202 if (extSide > 0) 203 return BACK_FRONT; 204 else if (extSide < 0) 205 return FRONT_BACK; 206 } 205 207 206 208 return COINCIDENT;
Note: See TracChangeset
for help on using the changeset viewer.