Return true if the two broad-phase collision shapes are overlapping
| 53 | |
| 54 | // Return true if the two broad-phase collision shapes are overlapping |
| 55 | bool BroadPhaseSystem::testOverlappingShapes(int32 shape1BroadPhaseId, int32 shape2BroadPhaseId) const { |
| 56 | |
| 57 | RP3D_PROFILE("BroadPhaseSystem::testOverlappingShapes()", mProfiler); |
| 58 | |
| 59 | assert(shape1BroadPhaseId != -1 && shape2BroadPhaseId != -1); |
| 60 | |
| 61 | // Get the two AABBs of the collision shapes |
| 62 | const AABB& aabb1 = mDynamicAABBTree.getFatAABB(shape1BroadPhaseId); |
| 63 | const AABB& aabb2 = mDynamicAABBTree.getFatAABB(shape2BroadPhaseId); |
| 64 | |
| 65 | // Check if the two AABBs are overlapping |
| 66 | return aabb1.testCollision(aabb2); |
| 67 | } |
| 68 | |
| 69 | // Ray casting method |
| 70 | void BroadPhaseSystem::raycast(const Ray& ray, RaycastTest& raycastTest, unsigned short raycastWithCategoryMaskBits) const { |
no test coverage detected