Plane
struct Planeimport Plane from Wax;A plane with equation dot(normal, point) = distance. Distance and projection operations require
a unit normal; the direct constructor does not normalize it. Use three non-collinear points with
FromPoints to construct a normalized plane.
Members
normalfield
public float3 normalThe expected unit normal defining the positive side.
distancefield
public float distanceThe plane offset in dot(normal, point) = distance; not the negated offset convention.
constructorconstructor
public constructor (float3 normal, float distance)Stores a unit normal and its plane offset without validation or normalization.
FromPointsconstructor
public constructor FromPoints (float3 a, float3 b, float3 c)Constructs a normalized plane using cross(b-a, c-a). Supply non-collinear points; winding selects the positive side.
DistanceTomethod
public fn DistanceTo(float3 point) : floatReturns dot(normal, point) - distance. This is signed Euclidean distance only for a unit normal.
ProjectPointmethod
public fn ProjectPoint(float3 point) : float3Projects onto the plane by subtracting normal times signed distance. Requires a unit normal.
Sidemethod
public fn Side(float3 point) : int32Returns -1, 0, or 1 for the negative side, exactly on the plane, or the positive side. Uses no tolerance.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.