Hi all,
I have an application that does a lot of cylinder / mesh intersection tests as fast as possible (not a real time app). I currently use ODE, but ODE has accuracy problems with meshes with big triangles. I am now looking for a replacement. I first checked out NVidia PhysX, but with PhysX it is not possible to do collision tests outside the game loop. What I need is basically this:
void Collide(cylinder, mesh, vec3& intersectionpoints).
Is this possible in Bullet?
Thanks for your help!
Cheers,
Martin
Only using collision system without game loop?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Only using collision system without game loop?
You can use Bullet just for the collision detection.
Usually you don't want to call a single cylinder versus mesh, but add all objects to the btCollisionWorld, and call btCollisionWorld::performDiscreteCollisionDetection.
This performs all collision culling, and the contact points are stored in btPersistentManifold structures.
See Bullet/Demos/CollisionInterfaceDemo how to iterate over all btPersistentManifold structures to get the contact (intersection) points.
Hope this helps,
Erwin
Usually you don't want to call a single cylinder versus mesh, but add all objects to the btCollisionWorld, and call btCollisionWorld::performDiscreteCollisionDetection.
This performs all collision culling, and the contact points are stored in btPersistentManifold structures.
See Bullet/Demos/CollisionInterfaceDemo how to iterate over all btPersistentManifold structures to get the contact (intersection) points.
Hope this helps,
Erwin