Sign in to follow this  
Alex Red

Triangles winding check...

Recommended Posts

Alex Red    136
I am converting an Models Database... Found that some models got some Triangles with no CCW vertex order, so, I have to fix them... is there a way ( knowing the plane Equation of the Triangle and vertices ) to figure out if the vertices are CW or CCW winding ordered...? tnx [R]ed

Share this post


Link to post
Share on other sites
Cast a ray from a point P, a long way outside of the mesh, towards the mesh's center. The first tri you hit (assuming the mesh has no holes) will be facing towards P. Now that you have a tri and know which way it is facing, you can determine the vertex winding.

Share this post


Link to post
Share on other sites
Alex Red    136
No... it is a DB conversion...
I have no positions...no point of view... no references... I have not rays... I have only vertices of a triangle in 3D space and it's plane equation, that should already tell me it's facing...

nothing else

Tnx

[R]ed

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this