Back to class index
Plane[Class Summary]
normal
d
ctor (+6 overloads)
Set(v1,v2,v3) (+1 overload)
ReverseNormal()
PointOnPlane()[const]
Transform(transform) (+3 overloads)
IsInPositiveDirection(directionVector)[const]
IsOnPositiveSide(point)[const]
ExamineSide(triangle)[const]
AreOnSameSide(p1,p2)[const]
Distance(point)[const] (+3 overloads)
SignedDistance(point)[const]
OrthoProjection()[const]
Project(point)[const] (+5 overloads)
ObliqueProjection(...)[const]
ObliqueProject(...)[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]
IsParallel(plane,epsilon)[const]
DihedralAngle(plane)[const]
Intersects(...)[const] (+14 overloads)
Clip(line)[const] (+3 overloads)
PassesThroughOrigin(epsilon)[const]
GenerateCircle(...)[const]

Plane::ClosestPoint

Syntax

float3 Plane::ClosestPoint(const float3 &point) const; [1 line of code]
float3 Plane::ClosestPoint(const Ray &ray) const; [9 lines of code]
float3 Plane::ClosestPoint(const LineSegment &lineSegment) const; [12 lines of code]

Computes the closest point on this plane to the given object.

If the other object intersects this plane, this function will return an arbitrary point inside the region of intersection.

Performance

float3 Plane::ClosestPoint(const float3 &point) const

8.21nsecs/call ≈ 121.8M calls/second ≈ 2.03M calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

float3 Plane::ClosestPoint(const Ray &ray) const

24.632nsecs/call ≈ 40.6M calls/second ≈ 676.64k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

float3 Plane::ClosestPoint(const LineSegment &lineSegment) const

0.078μsecs/call ≈ 12.82M calls/second ≈ 213.68k calls/frame (@ 60fps).
This function does not perform dynamic memory allocation.

See Also

Contains(), Distance(), Intersects().

Work in progress:

Todo: in float3 Plane::ClosestPoint(const Ray &ray) const:
Output parametric d as well.
Todo: in float3 Plane::ClosestPoint(const LineSegment &lineSegment) const:
Output parametric d as well.

Leave a Comment

Name:
Comments:
Captcha:captcha image Type in the black symbols:
Back to class index