Plane class

From Solid Graphics Wiki

(Redirected from Plane)
Jump to: navigation, search
Plane class
Namespace: SKL3D
Base type: Vector class
Include: Skl3D.h
Lib (Release): SKL.lib
Lib (Debug): SKL_D.lib

The Plane class represents a plane. The plane is specified by the plane's normal vector and it's distance from the coordinate system origin (by the offset field). The Plane class uses float precision.


Default Plane class constructor does not initialize the plane fields to any value. This is on purpose for performance reasons. Other class costructors allow to initialize the Plane object from other plane, vector and a offset, or four float valuse..


Field name Type Description
x float (inherited from the Vector class) the X coordinate of planes normal vector
y float (inherited from the Vector class) the Y coordinate of planes normal vector
z float (inherited from the Vector class) the Z coordinate of planes normal vector
offset float plane's distance value from the coordinate system origin (0, 0, 0). (The offset represents the distance correctly only if plane's normal vector's length is 1 )


Method name Description
Create Creates the plane from plane normal vector and a point which is part of the plane, or a three points lying in the plane.
RecalculateOffset Recalculates the offset field to include specified point.
Normalize Scales the plane values so its' normal vector's length is 1.
Scale Scales the plane values by specified factor.
Distance Returns distance of specified point to the plane.
GetUVVectors Returns two non-parallel vectors which lie inside of the plane.
ClosestPlanePoint Returns point which lies inside the plane and is closest to the specuified point.
VectorProjection Returns vector which is projection of specified vector to the plane's normal vector.


* Returns a plane equal to the plane instance scaled by the operand.
= assigns a vector to the plane. The offset field is initialized to value 0.0f.
*= Scales the plane by specified operand.
/= Divides the vector by specified operand

See Also


SolidKit Library Documentation

Personal tools