Jump to content
  • Advertisement
Sign in to follow this  
tiegudanxin

How to obtain all polygons?

This topic is 3891 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

Hi all! How to obtain all polygons of a mesh(all polygons in a same plane,the mesh is a plane)?The mesh consist of sorts of polygons that owns n edges(n may be 3,4,5,6 and 7.... and so on) thanks [Edited by - tiegudanxin on November 21, 2007 7:33:33 PM]

Share this post


Link to post
Share on other sites
Advertisement
There are only triangles in a mesh, no other polygons. The triangle informations are stored in the mesh's index buffer. For example, if the data in the index buffer is 4, 6, 2, 3, 2, 5, 1, 3, 5. the mesh has three triangles (4, 6, 2), (3, 2, 5) and (1, 3, 5). the number represents the corespondent vertex's poisition in the mesh's vertex buffer.

Share this post


Link to post
Share on other sites
Quote:
Original post by Einstone
There are only triangles in a mesh, no other polygons.
No, not necessarily.

tiegudanxin, I'm not quite sure what you're asking. You've got a mesh, and you want to extract the individual polygons from it? That depends on the format you've got the mesh in.

Share this post


Link to post
Share on other sites
Quote:
Original post by superpig
Quote:
Original post by Einstone
There are only triangles in a mesh, no other polygons.
No, not necessarily.

tiegudanxin, I'm not quite sure what you're asking. You've got a mesh, and you want to extract the individual polygons from it? That depends on the format you've got the mesh in.


I draw a graphics in my graphics program,It consist of vertexs and edges between vertexs,I know position of all vertexs,I want to obtain all polygons(concave and protrude) that the graphics owns.The graphics is a 2D graphics.
Sorry,My english is not good!
Thanks!

Share this post


Link to post
Share on other sites
Ah, right. Read this. What you're looking to do is to extract all the minimum cycles from your set of vertices and edges, because each minimum cycle is a single polygon.

Share this post


Link to post
Share on other sites
Quote:
Original post by superpig
Ah, right. Read this. What you're looking to do is to extract all the minimum cycles from your set of vertices and edges, because each minimum cycle is a single polygon.


Ah, great! Thanks!

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!