• Advertisement
Sign in to follow this  

convex concave test

This topic is 4226 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 am implementing collision detection code. i am using BSP tree for this. it came to my notice that convex/ concave test is required before passing the polygon to bsp tree for collision detection. How should i check whether set of polygons are convex or not? 3d model was developed using 3ds max and converted to .x file.

Share this post


Link to post
Share on other sites
Advertisement
If any vertex is 'outside' any of the planes that make the faces, the poly is concave. However I'd expect a decent 3D modeller to allow you to force all exported polys to be convex (splitting concave ones up into multiple polys). This is something that ought to be sorted by the level designer.

Share this post


Link to post
Share on other sites
A Convex Polygon has every internal angle <= 180.

There are many Polygon Triangulation algorithms which convert polygons into triangles ( A Triangle will Always be a Convex Polygon).

I havnt used .x files before however its likley that the model will already be made up of triangles.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement