Triangles winding check...

Started by
3 comments, last by Muhammad Haggag 18 years, 8 months ago
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
Advertisement
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.
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
This thread is a duplicate of http://www.gamedev.net/community/forums/topic.asp?topic_id=336581

All further replies should go there.
Crosspost

This topic is closed to new replies.

Advertisement