MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / reportContacts

Method reportContacts

src/systems/CollisionDetectionSystem.cpp:1729–1742  ·  view source on GitHub ↗

Report all contacts to the user

Source from the content-addressed store, hash-verified

1727
1728// Report all contacts to the user
1729void 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
1745void CollisionDetectionSystem::reportTriggers(EventListener& eventListener, Array<ContactPair>* contactPairs, Array<ContactPair>& lostContactPairs) {

Callers

nothing calls this directly

Calls 2

sizeMethod · 0.45
onContactMethod · 0.45

Tested by

no test coverage detected