| 194 | //----------------------------------------------------------------------------- |
| 195 | |
| 196 | bool SceneObject::containsPoint( const Point3F& point ) |
| 197 | { |
| 198 | // If it's not in the AABB, then it can't be in the OBB either, |
| 199 | // so early out. |
| 200 | |
| 201 | if( !mWorldBox.isContained( point ) ) |
| 202 | return false; |
| 203 | |
| 204 | // Transform point into object space and test it against |
| 205 | // our object space bounding box. |
| 206 | |
| 207 | Point3F objPoint( 0, 0, 0 ); |
| 208 | getWorldTransform().mulP( point, &objPoint ); |
| 209 | objPoint.convolveInverse( getScale() ); |
| 210 | |
| 211 | return ( mObjBox.isContained( objPoint ) ); |
| 212 | } |
| 213 | |
| 214 | //----------------------------------------------------------------------------- |
| 215 |
no test coverage detected