← Standard library

Plane

struct Plane
import 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.

Geometry3D.wax:241

Members

normalfield

public float3 normal

The expected unit normal defining the positive side.

Geometry3D.wax:245

distancefield

public float distance

The plane offset in dot(normal, point) = distance; not the negated offset convention.

Geometry3D.wax:249

constructorconstructor

public constructor (float3 normal, float distance)

Stores a unit normal and its plane offset without validation or normalization.

Geometry3D.wax:254

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.

Geometry3D.wax:263

DistanceTomethod

public fn DistanceTo(float3 point) : float

Returns dot(normal, point) - distance. This is signed Euclidean distance only for a unit normal.

Geometry3D.wax:275

ProjectPointmethod

public fn ProjectPoint(float3 point) : float3

Projects onto the plane by subtracting normal times signed distance. Requires a unit normal.

Geometry3D.wax:282

Sidemethod

public fn Side(float3 point) : int32

Returns -1, 0, or 1 for the negative side, exactly on the plane, or the positive side. Uses no tolerance.

Geometry3D.wax:291

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.