Triangle.barycentric

Gets the barycentric coordinates of the given point.

struct Triangle
@nogc pragma(inline, true) nothrow pure
vec3
barycentric
(
vec2 pt
)

Parameters

pt vec2

The point to check.

Return Value

Type: vec3

The barycentric coordinates in relation to each vertex of the triangle.

Meta