The point @p must lie on the same plane as the triangle @t; if the
point is not coplanar, the result of this function is undefined.
If we place the origin in the coordinates of the triangle's A point,
the barycentric coordinates are u, which is on the AC vector; and v
which is on the AB vector:
The returned #graphene_vec2_t contains the following values, in order:
Computes the barycentric coordinates of the given point @p.
The point @p must lie on the same plane as the triangle @t; if the point is not coplanar, the result of this function is undefined.
If we place the origin in the coordinates of the triangle's A point, the barycentric coordinates are u, which is on the AC vector; and v which is on the AB vector:
The returned #graphene_vec2_t contains the following values, in order:
- res.x = u - res.y = v