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::Distance

Syntax

float Plane::Distance(const float3 &point) const;
float Plane::Distance(const float4 &point) const; [4 lines of code]
float Plane::Distance(const LineSegment &lineSegment) const; [4 lines of code]
float Plane::Distance(const Sphere &sphere) const; [4 lines of code]
float Plane::Distance(const Capsule &capsule) const; [4 lines of code]

Returns the distance of this plane to the given object.

If the given object intersects or lies in this plane, then the returned distance is zero.

Note
This function always returns a positive distance value, even when the given object lies on the negative side of this plane. See the SignedDistance() function to produce a distance value that differentiates between the front and back sides of this plane.

See Also

SignedDistance(), Intersects(), Contains().