Minimalist usage of Bullet

just4n
Posts: 1
Joined: Thu Aug 15, 2013 8:19 pm

Minimalist usage of Bullet

Post by just4n »

Hello,

I am in need of a way to test intersection between arbitrary shapes. I am interested in using Bullet for this because it supports all of the various collision shapes that I may need to use. However, I would like to keep the usage of Bullet extremely minimal because all I need to be able to do is check if one shape collides with another. Basically I would like to be able to define two btCollisionObjects, set their transforms, and use their checkCollidesWith method to determine if the two shapes intersect. Would it be possible to use the Bullet engine this minimally? I have tried exactly this, but I seem to be running into problems with setting the transforms. I have tried using btCollisionObject->setWorldTransform but it doesn't seem to be working correctly. Setting the world transform on one btCollisionObject seems to set the worldTransform for all btCollisionObjects. Any advice would be greatly appreciated.
razer
Posts: 82
Joined: Sun Apr 04, 2010 10:08 pm

Re: Minimalist usage of Bullet

Post by razer »

You should be able to do what you want. It should not work like you describe.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Minimalist usage of Bullet

Post by Erwin Coumans »

You can use the btCollisionWorld::contactTest, or even more low level you can use GJK directly, see Bullet/Demos/CollisionInterfaceDemo or ConvexHullDistance.