|
|
I have a closed, 3D surface that is represented by a set of triangles. I
have a list of the vertices of every triangle (i.e. the Cartesian
coordinates of each vertex) and I have a list of integers (grouped in
threes) where each group of integers gives me the number of each vertex in a
triangle.
For example:
vertex 1 is 1.0,2.0,3.0
vertex 2 is 2.0,3.0,4.0
vertex 3 is 4.0,5.0,6.0
vertex 4 is 5.0,6.0,7.0
Triangle 1 is made up of vertices 1,2,3
Triangle 2 is made up of vertices 1,2,4
The data I am given is:
1.0,2.0,3.0
2.0,3.0,4.0
4.0,5.0,6.0
5.0,6.0,7.0
1,2,3
1,2,4
This is all the data I am given. I am not given any data about which side
of the triangle I am looking at. I am not given any data about the winding
of the vertices.
What I want to do is make sure all triangle normals are pointing out of the
surface and all triangles are wound counter-clockwise.
Is that a better statement of my problem? Any help you can provide would be
appreciated.
Jim
Post a reply to this message
|
|