vm_geom3_hit struct

Closest point on a triangle and its clamped barycentric coordinates.

bary.x + bary.y + bary.z == 1 and each component is in [0, 1].

Public variables

bool ok
false if the triangle is degenerate.
vector3 closest
Closest point on the triangle.
vector3 bary
Clamped barycentric weights (u, v, w) for (a, b, c).