Sign in to follow this  
esaint

Determine convex object

Recommended Posts

I was planning to write a simple 3d collision manager using convex polyhedra... Now, I wanted to be able to import objects and convert them to collision objects, but to simplify, I need to check if these objects are, in fact, convex objects. This is pure pre-processing and *never* needs to be done at run-time (well, at least not during play)... Now, say that I have a number of planes (Ax+By+Cz+D), or just a trianglemesh, are there any methods to determine whether this defines a convex object?

Share this post


Link to post
Share on other sites
Sure. Find out if each plane leaves the entire object on the same side. If the equation of one of the planes is Ax+By+Cz+D, just check that when you evaluate that expression in every vertex, you get the same sign.

Share this post


Link to post
Share on other sites
... Well, that was obvious enough, why didn't I think of that?

Anyway, thanks a lot! or as they said it in GTA; "May 10 sacred virgins shower you with Lotus Blossom!"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this