From a triangular mesh I have a 3D triangle T represented by 3D vertexes v0, v1 and v2. Each vertex has an associated UV coordinate into a common texture image, represented as uv0, uv1, uv2.
Furthermore there is 3D point P, that is guaranteed to be within the triangle T (coplanar to and within boundary of T).
My question is given point P, and triangle T, how does one go about calculating the UV coordinates of P?