# 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.

## 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 on other sites
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 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.

• 18
• 11
• 20
• 9
• 52
• ### Forum Statistics

• Total Topics
631397
• Total Posts
2999812
×

## Important Information

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

Sign me up!