vm_geom3_ray struct

Ray hit.

t is the smallest nonnegative parameter.

bary is the triangle weights (u, v, w) for (a, b, c). It is zero for every other primitive.

Public variables

bool ok
false if the query is degenerate.
bool hit
true when a point with t >= 0 exists.
vm_float_t t
Ray parameter.
vector3 point
origin + t * direction when hit is true.
vector3 bary
Triangle weights, or zero.

Variable documentation

vm_float_t vm_geom3_ray::t

Ray parameter.

Zero when hit is false.