SolidKit3D.Plane struct

From Solid Graphics Wiki

Jump to: navigation, search
SolidKit3D.Plane struct
Namespace: SolidKit3D
Base type: (None)
Assembly: SolidKit.dll
Platform: .NET

The Plane struct 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 struct uses float precision.


Struct costructors allow to initialize the Plane object from other plane, vector and a offset, or four float values.


Field name Type Description
x float the X coordinate of plane normal vector
y float the Y coordinate of plane normal vector
z float the Z coordinate of plane 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. The plane must be normalized in order for the method to return correct distance.
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.


* Depending on operand the method returns either a plane equal to the plane instance scaled by the operand or vector which is result of cross opearation between two planes.
= Divides all properties of the plane by specified float value

See Also


SolidKit Library Documentation

Personal tools