Ray.intersect

Ray vs triangle intersection.

struct Ray(T, int N)
nothrow @nogc pure const nothrow
static if(N == 3)
bool
intersect
(,
out T t
,
out T u
,
out T v
)

Return Value

Type: bool

Barycentric coordinates, the intersection point is at (1 - u - v) * A + u * B + v * C.

See Also

"Fast, Minimum Storage Ray/Triangle intersection", Mommer & Trumbore (1997)

Meta