An object has been approximated by a lot of triangles. Given the vertex positions of these triangles, how can I compute the normal of these vertices which pointing outside of the object.
I know the cross-product of two edges gives the normal, but how can I know it's pointing towards the outside of the object.
For a convex object, add up all the vertices to get a center representation. Take the dot product of the normal you obtain with the vector joining the vertex to this center. If this is negative the normal is pointing outward. (For non-convex object this won't work though)