Segment.intersect

Segment vs plane intersection.

struct Segment(T, int N)
@nogc pure const nothrow
static if(N == 3 && isFloatingPoint!T)
bool
intersect

Parameters

plane Plane!T

The plane to intersect.

intersection point_t

Point of intersection.

progress T

Set to the point's progress between endpoints a at 0.0 and b at 1.0, or T.infinity if parallel to the plane

Return Value

Type: bool

true if the segment crosses the plane exactly once, or false if the segment is parallel to or does not reach the plane

See Also

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

Meta