Report all contacts to the user
| 1727 | |
| 1728 | // Report all contacts to the user |
| 1729 | void CollisionDetectionSystem::reportContacts(CollisionCallback& callback, Array<ContactPair>* contactPairs, |
| 1730 | Array<ContactManifold>* manifolds, Array<ContactPoint>* contactPoints, Array<ContactPair>& lostContactPairs) { |
| 1731 | |
| 1732 | RP3D_PROFILE("CollisionDetectionSystem::reportContacts()", mProfiler); |
| 1733 | |
| 1734 | // If there are contacts |
| 1735 | if (contactPairs->size() + lostContactPairs.size() > 0) { |
| 1736 | |
| 1737 | CollisionCallback::CallbackData callbackData(contactPairs, manifolds, contactPoints, lostContactPairs, *mWorld); |
| 1738 | |
| 1739 | // Call the callback method to report the contacts |
| 1740 | callback.onContact(callbackData); |
| 1741 | } |
| 1742 | } |
| 1743 | |
| 1744 | // Report all triggers to the user |
| 1745 | void CollisionDetectionSystem::reportTriggers(EventListener& eventListener, Array<ContactPair>* contactPairs, Array<ContactPair>& lostContactPairs) { |