Back to class index
Plane[Class Summary]
normal
d
ctor (+6 overloads)
IsDegenerate()[const]
Set(v1,v2,v3) (+1 overload)
ReverseNormal()
PointOnPlane()[const]
Point(u,v)[const] (+1 overload)
Translate(offset)
Transform(transform) (+3 overloads)
IsInPositiveDirection(directionVector)[const]
IsOnPositiveSide(point)[const]
ExamineSide(triangle)[const]
AreOnSameSide(p1,p2)[const]
Distance(point)[const] (+4 overloads)
SignedDistance(point)[const] (+11 overloads)
OrthoProjection()[const]
Project(point)[const] (+5 overloads)
ProjectToNegativeHalf(point)[const]
ProjectToPositiveHalf(point)[const]
MirrorMatrix()[const]
Mirror(point)[const]
Refract(...)[const]
ClosestPoint(point)[const] (+2 overloads)
Contains(point,epsilon)[const] (+6 overloads)
SetEquals(plane,epsilon)[const]
Equals(other,epsilon)[const]
BitEquals(other)[const]
IsParallel(plane,epsilon)[const]
DihedralAngle(plane)[const]
Intersects(...)[const] (+14 overloads)
Clip(line)[const] (+3 overloads)
PassesThroughOrigin(epsilon)[const]
GenerateCircle(...)[const]
ToString()[const]
SerializeToString()[const]
SerializeToCodeString()[const]
IntersectLinePlane(...)[static]
FromString(str,outEndStr)[static] (+1 overload)

Plane::IntersectLinePlane

Syntax

bool Plane::IntersectLinePlane(const float4 &planeNormal, float planeD, const float4 &linePos, const float4 &lineDir, float &t); [39 lines of code]

Computes the intersection of a line and a plane.

Parameters

const float4 &planeNormalThe plane normal direction vector. This vector can be unnormalized. floatplaneDThe distance parameter of the plane equation. const float4 &linePosThe starting point of the line. const float4 &lineDirThe line direction vector. This vector does not need to be normalized. float &t [out]If this function returns true, this parameter will receive the distance along the line where intersection occurs. That is, the point lineStart + t * lineDir will be the intersection point. Note that if |lineDir| != 1, then t will not contain the real distance, but one scaled to the units of lineDir.

Return Value

If an intersection occurs, this function returns true.