Public Member Functions | |
virtual btScalar | addSingleResult (btManifoldPoint &cp, const btCollisionObject *colObj0, int partId0, int index0, const btCollisionObject *colObj1, int partId1, int index1) |
Called with each contact for your own processing (e.g. test if contacts fall in within sensor parameters) | |
ContactSensorCallback (btRigidBody &tgtBody) | |
Constructor, pass whatever context you want to have available when processing contacts. | |
virtual bool | needsCollision (btBroadphaseProxy *proxy) const |
If you don't want to consider collisions where the bodies are joined by a constraint, override needsCollision: | |
Public Attributes | |
btRigidBody & | body |
The body the sensor is monitoring. | |
int | collided |
Definition at line 21 of file URDFRobot.cpp.
ContactSensorCallback::ContactSensorCallback | ( | btRigidBody & | tgtBody | ) | [inline] |
Constructor, pass whatever context you want to have available when processing contacts.
You may also want to set m_collisionFilterGroup and m_collisionFilterMask (supplied by the superclass) for needsCollision()
Definition at line 27 of file URDFRobot.cpp.
virtual btScalar ContactSensorCallback::addSingleResult | ( | btManifoldPoint & | cp, |
const btCollisionObject * | colObj0, | ||
int | partId0, | ||
int | index0, | ||
const btCollisionObject * | colObj1, | ||
int | partId1, | ||
int | index1 | ||
) | [inline, virtual] |
Called with each contact for your own processing (e.g. test if contacts fall in within sensor parameters)
Definition at line 49 of file URDFRobot.cpp.
virtual bool ContactSensorCallback::needsCollision | ( | btBroadphaseProxy * | proxy | ) | const [inline, virtual] |
If you don't want to consider collisions where the bodies are joined by a constraint, override needsCollision:
However, if you use a btCollisionObject for body instead of a btRigidBody, then this is unnecessary—checkCollideWithOverride isn't available
Definition at line 39 of file URDFRobot.cpp.
btRigidBody& ContactSensorCallback::body |
The body the sensor is monitoring.
Definition at line 33 of file URDFRobot.cpp.
Definition at line 34 of file URDFRobot.cpp.