src/systems/CollisionDetectionSystem.cpp
// Report all contacts to the user
Report all contacts to the user
Report all contacts to the user
void CollisionDetectionSystem::reportContacts(CollisionCallback& callback, Array<ContactPair>* contactPairs,
                                              Array<ContactManifold>* manifolds, Array<ContactPoint>* contactPoints, Array<ContactPair>& lostContactPairs) {
    RP3D_PROFILE("CollisionDetectionSystem::reportContacts()", mProfiler);
    if (contactPairs->size() + lostContactPairs.size() > 0) {
        CollisionCallback::CallbackData callbackData(contactPairs, manifolds, contactPoints, lostContactPairs, *mWorld);
        callback.onContact(callbackData);
    }
}
void CollisionDetectionSystem :: reportContacts ( CollisionCallback & callback , Array < ContactPair > * contactPairs , Array < ContactManifold > * manifolds , Array < ContactPoint > * contactPoints , Array < ContactPair > & lostContactPairs ) { RP3D_PROFILE ( " " , mProfiler ) ; if ( contactPairs -> size ( ) + lostContactPairs . size ( ) > 0 ) { CollisionCallback :: CallbackData callbackData ( contactPairs , manifolds , contactPoints , lostContactPairs , * mWorld ) ; callback . onContact ( callbackData ) ; } }
Report all contacts to the user
Report all contacts to the user
// If there are contacts // Call the callback method to report the contacts