Function triangle_barycentric3

Source
pub fn triangle_barycentric3(
    triangle: &Triangle3,
    point: DVec3,
    tolerance: Tolerance,
) -> Result<[f64; 3], BarycentricError>
Expand description

Barycentric coordinates of point in a 3D triangle, as weights of a, b and c.

A point off the triangle’s plane gets the coordinates of its orthogonal projection onto that plane: the weights reproduce the projection, not the point.

§Errors

As triangle_barycentric2.