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

Syntax

bool Plane::Clip(LineSegment &line) const; [4 lines of code]
bool Plane::Clip(float4 &a, float4 &b) const; [20 lines of code]

Clips a line segment against this plane.

This function removes the part of the line segment which lies in the negative halfspace of this plane. The clipping operation is performed in-place. If the whole line segment is clipped, the input variables are not modified.

Return Value

If this function returns true, the line segment after clipping did not become degenerate. If false is returned, the whole line segment lies in the negative halfspace, and no output line segment was generated.

Syntax

int Plane::Clip(const Line &line, Ray &outRay) const; [20 lines of code]

Clips a line against this plane.

This function removes the part of the line which lies in the negative halfspace of this plane.

Parameters

const Line &lineThe line to clip. If this function returns 2, then the input line should be preserved. Ray &outRay [out]If this function returns 1, then this parameter will receive the ray object that was formed.

Return Value

If the clipping removed the whole line, the value 0 is returned. If the clipping resulted in a ray, the value 1 is returned. If the clipping resulted in a line, the value 2 is returned.

Syntax

int Plane::Clip(const Triangle &triangle, Triangle &t1, Triangle &t2) const; [70 lines of code]

Clips a triangle against this plane.

This function removes the part of the triangle which lies in the negative halfspace of this plane.

Return Value

This function reports how many output triangles were generated. If the whole input triangle was clipped, the value 0 is returned. If this function returns 1, the value t1 will receive the generated output triangle. If this function returns 2, t1 and t2 will receive the generated output triangles.