Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

qzou

Triangle vertices orientation in solid

This topic is 5890 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, there, I have a closed solid which is modelled as a collection of triangles. In order to calculate the solid volume, I need to set the vertices orientation of every triangle to be counterclockwise so that the triangle normals point outside. Could someone tell me how to do it. Thanks a lot

Share this post


Link to post
Share on other sites
Advertisement
If you don''t care about sharing vertexes between triangles this gets trivial. Just take one triangle at a time and set the correct vertex order (assuming you know which side of the triangle that is the outside)

If you want to share some vertexes among triangles it gets more complex. The usual way to that is to use some algorithm that converts your model into triangle strips (so-called strippifiers). This does not allow you to share all of the vertexes to but it certainly helps to reduce dublication.

Jacob

Share this post


Link to post
Share on other sites

  • 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!