Advertisement

Barycentric coordinates?

Started by September 11, 2002 12:07 PM
0 comments, last by pan narrans 22 years, 5 months ago
ID3DXIntersect returns the point on a triangle that was hit by a ray if there was a collision. Unfortunately it returns this point as a barycentric coordinate (U,V), and this is of ABSOLUTELY NO USE to me. How would I go about turning this barycentric coordinate into a vector (X, Y, Z) I can use to represent the hit point?
Minister of Propaganda : leighstringer.com : Nobody likes the man who brings bad news - Sophocles (496 BC - 406 BC), Antigone
P = u * p1 + v * p2 + (1 - u - v) * p3, where p1,p2,p3 are the vertices of the triangle.

This topic is closed to new replies.

Advertisement