How to best find adjacent convex hulls

seanm92
Posts: 2
Joined: Thu Jul 22, 2010 9:53 pm

How to best find adjacent convex hulls

Post by seanm92 »

Hello all,

I've been trying to improve the ConvexDecompositionDemoEx by adding connectivity to the btCompoundShape. The problem I have is that I can't seem to find a good way to test if btConvexHullShapes are adjacent/touching each another. I've tried using btCollisionShape::getBoundingSphere but it seems to be too inaccurate. Any ideas would be appreciated.

Cheers,
Sean
seanm92
Posts: 2
Joined: Thu Jul 22, 2010 9:53 pm

Re: How to best find adjacent convex hulls

Post by seanm92 »

Ok so it seems that my bounding spheres are completely incorrect for each btConvexHullShape within a btCompoundShape (see picture.. the pink is a building and the green are the bounding spheres). What is fastest way to calculate bounding spheres?

Cheers,
Sean McVey
You do not have the required permissions to view the files attached to this post.
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: How to best find adjacent convex hulls

Post by sparkprime »

max(distance to each vertex from objectspace 0,0,0)

and add on the collision margin