Ray.intersectTriangle

Ray vs triangle intersection.

struct Ray
nothrow @nogc pure const nothrow
bool
intersectTriangle
(
vec3f A
,
vec3f B
,
vec3f C
,
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