ReactPhysics3D
v0.10.2
C++ Physics engine library
|
This class contains data about contacts between bodies. More...
#include <include/reactphysics3d/collision/CollisionCallback.h>
Public Member Functions | |
uint32 | getNbContactPairs () const |
Return the number of contact pairs. | |
ContactPair | getContactPair (uint64 index) const |
Return a given contact pair. | |
This class contains data about contacts between bodies.
CollisionCallback::ContactPair CollisionCallback::CallbackData::getContactPair | ( | uint64 | index | ) | const |
Return a given contact pair.
Note that the returned ContactPair object is only valid during the call of the CollisionCallback::onContact() method.
index | Index of the contact pair to retrieve |
Therefore, you need to get contact data from it and make a copy. Do not make a copy of the ContactPair object itself because it won't be valid after the CollisionCallback::onContact() call.
RP3D_FORCE_INLINE uint32 reactphysics3d::CollisionCallback::CallbackData::getNbContactPairs | ( | ) | const |
Return the number of contact pairs.