Return true if a point is inside the collision shape * @param worldPoint Point to test in world-space coordinates * @return True if the point is inside the collision shape */
| 56 | * @return True if the point is inside the collision shape |
| 57 | */ |
| 58 | bool Collider::testPointInside(const Vector3& worldPoint) { |
| 59 | const Transform localToWorld = mBody->mWorld.mTransformComponents.getTransform(mBody->getEntity()) * |
| 60 | mBody->mWorld.mCollidersComponents.getLocalToBodyTransform(mEntity); |
| 61 | const Vector3 localPoint = localToWorld.getInverse() * worldPoint; |
| 62 | const CollisionShape* collisionShape = mBody->mWorld.mCollidersComponents.getCollisionShape(mEntity); |
| 63 | return collisionShape->testPointInside(localPoint, this); |
| 64 | } |
| 65 | |
| 66 | // Set the collision category bits |
| 67 | /** |
nothing calls this directly
no test coverage detected