SPIN Framework
|
Public Member Functions | |
btContactCallback (btRigidBody &tgtBody, CollisionShape &node) | |
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: | |
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) | |
Public Attributes | |
btRigidBody & | body |
The body the sensor is monitoring. | |
CollisionShape & | node_ |
External information for contact processing. |
spin::btContactCallback::btContactCallback | ( | btRigidBody & | tgtBody, |
CollisionShape & | node | ||
) | [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()
virtual bool spin::btContactCallback::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