Jump to content
  • Advertisement
Sign in to follow this  
esaint

Determine convex object

This topic is 4975 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!