Where can I find ContactResultCallback in OgreBullet?

farrukh50

02-01-2014 17:44:50

Im trying to find a collision between 2 rigidbodies in ogrebullet and the wiki has this example

http://bulletphysics.org/mediawiki-1.5.8/index.php/Collision_Callbacks_and_Triggers

struct ContactSensorCallback : public btCollisionWorld::ContactResultCallback {

ContactSensorCallback(btRigidBody& tgtBody)
: btCollisionWorld::ContactResultCallback(), body(tgtBody) { }

}

I cant pass a OgreBUlletDynamics::RigidBody to this as its asking for a btRigidBody and if I change it to OgreBUlletDynamics::RigidBody then I start getting errors.

Any help please

AlexeyKnyshev

07-01-2014 21:38:01

OgreBulletRigidBody has API:

btRigidBody *getBulletRigidBody() const;

Which provides you access to intenal (bullet) data structure. Class, which u want to use consumes this data type as argument.

Hope it'd probably be helpful for u.
Best regards, Alexey Knyshev