[C++] Edge's vertices direction

Discussions concerning programming of SOFTIMAGE©
Post Reply
User avatar
Yanik
Posts: 24
Joined: 15 Aug 2012, 21:16

[C++] Edge's vertices direction

Post by Yanik » 06 Oct 2012, 20:30

I want to create a simple and fast apply thickness tool just to learn some c++ during the progress, nothing serious. Never touched c++ before so I wanted to do this as my "hello world" project.
I've learned a lot so far but I'm currently stuck on something probably very simple.

I've filtered all boundary edges and want to connect the top and bottom side polygons. To build the side facing polygons I need to set up the polygon descriptor data in the correct vertex order(Counter Clockwise). To get each boundary edge's vertices I use the GetVertices() function which returns an array of 2 vertices in no specific order.
I want to know in which direction they flow along the boundary edge of a polygon, clockwise or counter clockwise.

The image below may explain the issue better.
Attachments
invalid_normals.jpg

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: [C++] Edge's vertices direction

Post by rray » 07 Oct 2012, 23:22

All I remember (from a few years back) that the point order is ok only if you get them from the polygons directly. If you could post code maybe more memory would return :ymblushing:
softimage resources section updated Jan 5th 2024

Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests