intersectsLine

Find the intersection between a plane and a line, if any.

@safe pure nothrow @nogc
bool
intersectsLine
(
F
)
(
const PlaneT!F plane
,
const Vector!(F, 3) lineOrigin
,
const Vector!(F, 3) lineVector
,
out Vector!(F, 3) intersection
)

Parameters

plane PlaneT!F

Plane to check for intersection with.

lineOrigin Vector!(F, 3)

Origin of the line (the 'anchor point' fom which lineVector starts)

lineVector Vector!(F, 3)

Vector (direction) of the line.

intersection Vector!(F, 3)

If the plane intersects the line, the intersection point is written here.

Return Value

Type: bool

true if the plane intersects the line. false otherwise.

Meta