Collision callback to collect collision pairs potentially in contacts. More...
#include <default_broadphase_callbacks.h>
Public Types | |
typedef std::pair< CollisionObject *, CollisionObject * > | CollisionPair |
Public Member Functions | |
bool | collide (CollisionObject *o1, CollisionObject *o2) |
Collision evaluation between two objects in collision. This callback will cause the broadphase evaluation to stop if it returns true. More... | |
CollisionCallBackCollect (const size_t max_size) | |
Default constructor. More... | |
bool | exist (CollisionObject *o1, CollisionObject *o2) const |
Check whether a collision pair exists. More... | |
bool | exist (const CollisionPair &pair) const |
Check whether a collision pair exists. More... | |
const std::vector< CollisionPair > & | getCollisionPairs () const |
Returns a const reference to the active collision_pairs to check. More... | |
void | init () |
Reset the callback. More... | |
size_t | numCollisionPairs () const |
Returns the number of registered collision pairs. More... | |
virtual | ~CollisionCallBackCollect () |
Public Member Functions inherited from coal::CollisionCallBackBase | |
virtual bool | operator() (CollisionObject *o1, CollisionObject *o2) |
Functor call associated to the collide operation. More... | |
Protected Attributes | |
std::vector< CollisionPair > | collision_pairs |
size_t | max_size |
Collision callback to collect collision pairs potentially in contacts.
Definition at line 223 of file coal/broadphase/default_broadphase_callbacks.h.
typedef std::pair<CollisionObject*, CollisionObject*> coal::CollisionCallBackCollect::CollisionPair |
Definition at line 224 of file coal/broadphase/default_broadphase_callbacks.h.
coal::CollisionCallBackCollect::CollisionCallBackCollect | ( | const size_t | max_size | ) |
Default constructor.
Definition at line 92 of file default_broadphase_callbacks.cpp.
|
inlinevirtual |
Definition at line 246 of file coal/broadphase/default_broadphase_callbacks.h.
|
virtual |
Collision evaluation between two objects in collision. This callback will cause the broadphase evaluation to stop if it returns true.
[in] | o1 | Collision object #1. |
[in] | o2 | Collision object #2. |
Implements coal::CollisionCallBackBase.
Definition at line 97 of file default_broadphase_callbacks.cpp.
bool coal::CollisionCallBackCollect::exist | ( | CollisionObject * | o1, |
CollisionObject * | o2 | ||
) | const |
Check whether a collision pair exists.
Definition at line 114 of file default_broadphase_callbacks.cpp.
bool coal::CollisionCallBackCollect::exist | ( | const CollisionPair & | pair | ) | const |
Check whether a collision pair exists.
Definition at line 119 of file default_broadphase_callbacks.cpp.
const std::vector< CollisionCallBackCollect::CollisionPair > & coal::CollisionCallBackCollect::getCollisionPairs | ( | ) | const |
Returns a const reference to the active collision_pairs to check.
Definition at line 108 of file default_broadphase_callbacks.cpp.
|
virtual |
Reset the callback.
Reimplemented from coal::CollisionCallBackBase.
Definition at line 112 of file default_broadphase_callbacks.cpp.
size_t coal::CollisionCallBackCollect::numCollisionPairs | ( | ) | const |
Returns the number of registered collision pairs.
Definition at line 103 of file default_broadphase_callbacks.cpp.
|
protected |
Definition at line 246 of file coal/broadphase/default_broadphase_callbacks.h.
|
protected |
Definition at line 250 of file coal/broadphase/default_broadphase_callbacks.h.