| 173 | //----------------------------------------------------------------------------- |
| 174 | |
| 175 | bool SceneObject::containsPoint( const Point3F& point ) |
| 176 | { |
| 177 | // If it's not in the AABB, then it can't be in the OBB either, |
| 178 | // so early out. |
| 179 | |
| 180 | if( !mWorldBox.isContained( point ) ) |
| 181 | return false; |
| 182 | |
| 183 | // Transform point into object space and test it against |
| 184 | // our object space bounding box. |
| 185 | |
| 186 | Point3F objPoint( 0, 0, 0 ); |
| 187 | getWorldTransform().mulP( point, &objPoint ); |
| 188 | objPoint.convolveInverse( getScale() ); |
| 189 | |
| 190 | return ( mObjBox.isContained( objPoint ) ); |
| 191 | } |
| 192 | |
| 193 | //----------------------------------------------------------------------------- |
| 194 |
no test coverage detected