Triangles winding check...
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
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
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.
All further replies should go there.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement