Ray casting method
| 68 | |
| 69 | // Ray casting method |
| 70 | void BroadPhaseSystem::raycast(const Ray& ray, RaycastTest& raycastTest, unsigned short raycastWithCategoryMaskBits) const { |
| 71 | |
| 72 | RP3D_PROFILE("BroadPhaseSystem::raycast()", mProfiler); |
| 73 | |
| 74 | BroadPhaseRaycastCallback broadPhaseRaycastCallback(mDynamicAABBTree, raycastWithCategoryMaskBits, raycastTest); |
| 75 | |
| 76 | // Compute the inverse ray direction |
| 77 | const Vector3 rayDirection = ray.point2 - ray.point1; |
| 78 | const Vector3 rayDirectionInverse(decimal(1.0) / rayDirection.x, decimal(1.0) / rayDirection.y, decimal(1.0) / rayDirection.z); |
| 79 | |
| 80 | mDynamicAABBTree.raycast(ray, broadPhaseRaycastCallback); |
| 81 | } |
| 82 | |
| 83 | // Add a collider into the broad-phase collision detection |
| 84 | void BroadPhaseSystem::addCollider(Collider* collider, const AABB& aabb) { |
nothing calls this directly
no outgoing calls
no test coverage detected