Jump to content
  • Advertisement
Sign in to follow this  
My_Mind_Is_Going

determining if a group of polygons forms a convex region

This topic is 3018 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'm trying to figure out a test to tell if a list of polygons form a convex region. This is part of some BSP stuff I'm doing so the region in question isn't necessarily closed. It seems like as a brute force approach I can just dot the normal of each polygon with the normal of every other one and make sure the dot products all have the same sign (i.e. all normals are either pointing inward or outward). Does anyone know if this approach is correct? This is being done offline so I'm not really concerned with efficiency. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
What you need to do is calculate the plane equation of each triangle then check that all your other vertices are behind that plane

This doesn't tell you that you have a complete closed convex hull, but does tell you that the triangles you have at least partially formed a convex hull

Share this post


Link to post
Share on other sites
If you calculate the convex hull of the polygons (using something like the quickhull algorithm), each polygon should be coincident with a side of the hull. As an added bonus, you can also figure out where you are missing polygons on the hull.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!