Ray.intersect

Ray vs plane intersection.

  1. bool intersect(Triangle!(T, 3) triangle, T t, T u, T v)
  2. bool intersect(Plane!T plane, point_t intersection, T distance)
    struct Ray(T, int N)
    nothrow @nogc pure const nothrow
    static if(N == 3 && isFloatingPoint!T)
    bool
    intersect

Parameters

plane Plane!T

Plane to intersect.

intersection point_t

Point of intersection.

distance T

set to the point's distance along the ray, or T.infinity if parallel to the plane

Return Value

Type: bool

true if the ray crosses the plane exactly once, or false if the ray is parallel to or points away from the plane

See Also

"Geometry for Computer Graphics: Formulae, Examples and Proofs", Vince (2005), p. 62

Meta