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

Syntax

bool Plane::Intersects(const Plane &plane, const Plane &plane2, Line *outLine=0, float4 *outPoint=0) const; [45 lines of code]

Computes the intersection of three planes.

This function computes the intersection of this plane, and the given two planes.

Parameters

Line *outLine [out]If the three planes are configured in such a manner that intersection is a line, this parameter receives the line of intersection. This pointer may be null.float4 *outPoint [out]If the three planes are configured in such a manner that the interesction is a point, this parameter receives the point of intersection. This pointer may be null.

Return Value

True if the intersection was a point, in which case outPoint is written to.

See Also

Contains(), Distance(), ClosestPoint().

Work in progress:

Bug: in bool Plane::Intersects(const Plane &plane, const Plane &plane2, Line *outLine=0, float4 *outPoint=0) const:
This function never outputs outLine.

Syntax

bool Plane::Intersects(const Plane &plane, Line *outLine=0) const; [26 lines of code]
bool Plane::Intersects(const Ray &ray, float *d=0) const; [8 lines of code]
bool Plane::Intersects(const Line &line, float *d=0) const; [8 lines of code]
bool Plane::Intersects(const LineSegment &lineSegment, float *d=0) const; [9 lines of code]
bool Plane::Intersects(const Sphere &sphere) const; [4 lines of code]
bool Plane::Intersects(const AABB &aabb) const; [12 lines of code]
bool Plane::Intersects(const OBB &obb) const; [4 lines of code]
bool Plane::Intersects(const Polygon &polygon) const; [4 lines of code]
bool Plane::Intersects(const Polyhedron &polyhedron) const; [10 lines of code]
bool Plane::Intersects(const Triangle &triangle) const; [7 lines of code]
bool Plane::Intersects(const Frustum &frustum) const; [8 lines of code]
bool Plane::Intersects(const Capsule &capsule) const; [4 lines of code]

Tests whether this plane and the given object intersect.

The Plane-AABB intersection is implemented according to Christer Ericson's Real-Time Collision Detection, p.164.

Parameters

Line *outLine [out]The intersection of two planes forms a line. If an intersection occurs, this parameter will receive the line of intersection. This pointer may be null.float *d [out]If specified, this parameter will receive the parametric distance of the intersection point along the line object. Use the GetPoint(d) function of the line class to get the actual point of intersection. This pointer may be null.

Return Value

True if the given object intersects with this plane.

Work in progress:

Todo: in bool Plane::Intersects(const AABB &aabb) const:
Use the above form when Plane is SSE'ized.
Todo: in bool Plane::Intersects(const Triangle &triangle) const:
Add a version of Plane-Triangle intersection which returns the line segment of intersection.

Syntax

int Plane::Intersects(const Circle &circle, float4 *pt1, float4 *pt2) const; [21 lines of code]
int Plane::Intersects(const Circle &circle) const; [4 lines of code]

Tests if this plane intersects with the given circle.

Parameters

float4 *pt1 [out]If specified, receives the first point of intersection. This pointer may be null.float4 *pt2 [out]If specified, receives the second point of intersection. This pointer may be null.

Return Value

The number of intersections that occurred: 0, 1 or 2.