plane.signedDistance

The signed distance of a point from a plane, positive on the normal’s side.

Value helperSince 0.3.0

Usage

TypeScript
Plane.signedDistance(p: Plane, q: Point3): number

Parameters

  • pPlane

    The plane, with orthonormal right-handed axes (as Plane.fromFrame and Plane.fromNormal build them). Required. In model.

  • qPoint3

    The point to measure. Required. In model.

Returns

Distance in model units: positive on the side zAxis points to, negative behind, 0 on the plane; NaN for non-finite input.

Example

TypeScript
Plane.signedDistance(Plane.worldXY, Point3.of(5, 5, -2)) // → -2

See also