getBarycoord

fun getBarycoord(point: Vector3, target: Vector3): Vector3?

Computes the barycentric coordinates of point in this triangle. Returns null (and sets target to zero) if the triangle is degenerate.

Return

The barycentric coordinates for the given point, or null if degenerate.

Parameters

point

A point in 3D space.

target

The target vector that is used to store the method's result.