Jump to content
  • Advertisement
Sign in to follow this  
lephyrius

Polygon triangulation library that handles holes?

This topic is 3630 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 want to know if there is a free polygon triangulation library that handles holes inside polygons. I want it to be small and not like CGAL or WildMagic more like GPC library. The only problem with GPC is that it creates triangle strip not only triangles.

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by lephyrius
I want to know if there is a free polygon triangulation library that handles holes inside polygons. I want it to be small and not like CGAL or WildMagic more like GPC library. The only problem with GPC is that it creates triangle strip not only triangles.
This may not be what you're looking for, but the GLU library tesselator can handle arbitrary polygons (including those with holes), and IINM it can be used independently of an OpenGL context (that is, you don't have to be using OpenGL for your graphics system in order to make use of the GLU tesselator).

Again though, it may not meet your needs, as it does require linking to the entire GLU library.

Share this post


Link to post
Share on other sites
Quote:
Original post by lephyrius
The only problem with GPC is that it creates triangle strip not only triangles.

Unpacking triangle strips (or fans) to other reasonable data structures appears very easy and cheap: why is it unacceptable for you? What data structures are you using for the input polygons and for the output triangles?

Share this post


Link to post
Share on other sites
Quote:
Original post by LorenzoGatti
Unpacking triangle strips (or fans) to other reasonable data structures appears very easy and cheap: why is it unacceptable for you? What data structures are you using for the input polygons and for the output triangles?


Im using a list of outer contour vertices and inner contours as input. I want pure triangle list with indices when i insert them in a VBO to render them. I will also use the triangles for collision detection. The thing with GPC is that I got the feeling that it wouldn't produce optimal triangles.

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!