| 203 | } |
| 204 | |
| 205 | bool BoxBrush::IntersectsItself(const Ray& ray, Real& distance, Vector3& normal) |
| 206 | { |
| 207 | bool result = false; |
| 208 | Real minDistance = MAX_float; |
| 209 | Vector3 minDistanceNormal = Vector3::Up; |
| 210 | if (_bounds.Intersects(ray, distance)) |
| 211 | { |
| 212 | for (int32 surfaceIndex = 0; surfaceIndex < 6; surfaceIndex++) |
| 213 | { |
| 214 | if (Intersects(surfaceIndex, ray, distance, normal) && distance < minDistance) |
| 215 | { |
| 216 | minDistance = distance; |
| 217 | minDistanceNormal = normal; |
| 218 | result = true; |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | distance = minDistance; |
| 223 | normal = minDistanceNormal; |
| 224 | return result; |
| 225 | } |
| 226 | |
| 227 | #if USE_EDITOR |
| 228 |
nothing calls this directly
no test coverage detected