Vector3Barycenter method
Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c)
NOTE: Assumes P is on the plane of the triangle
Implementation
@override
Vector3D Vector3Barycenter(
Vector3D p,
Vector3D a,
Vector3D b,
Vector3D c,
) => $.Vector3$.Extract5(
(ptr) => _ffi.Vector3Barycenter(
$.Vector3$.Ref1(p).asNativePointer<Vector3C>().ref,
$.Vector3$.Ref2(a).asNativePointer<Vector3C>().ref,
$.Vector3$.Ref3(b).asNativePointer<Vector3C>().ref,
$.Vector3$.Ref4(c).asNativePointer<Vector3C>().ref,
).toDart(ptr.asNativePointer()),
);