I'm trying to build a uniform grid made of 3D points over the surface of an arbitrary mesh (we have texture-coordinates for each vertex...)
Or to reformulate: imagine a mesh textured with a texture featuring equally spaced dots: I want to obtain the 3D coordinates of these dots.
So far, I'm able to generate a normal for each triangle of the mesh but it is not enough.
If I had the right matrix, or quaternion or even orthonormal-basis for each triangle, I guess that I could transform any 2D coordinates (on the triangle's plane) to 3D coordinates (in object space...)
The problem is how to rotate properly in regards to texture coordinates?
To be more specific: for each triangle, I can define a normal. It could serve as the x,y,z part of a quaternion. But how could I generate the w part?