Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "plane"

Index

Functions

Const closestPointPlane

  • closestPointPlane(p: ReadonlyVec, normal: ReadonlyVec, w: number, out?: Vec): Vec
  • Returns closest point to p on the plane defined by normal n and w. In 2D this also works for lines.

    Parameters

    • p: ReadonlyVec
    • normal: ReadonlyVec
    • w: number
    • Default value out: Vec = []

    Returns Vec

Const distToPlane

  • distToPlane(p: ReadonlyVec, n: ReadonlyVec, w: number): number
  • Returns signed distance between point p and plane defined by normal n and w. In 2D this also works for lines.

    remarks

    If result is > 0 the point lies "above" the plane, if < 0 below the plane or if zero on the plane.

    Parameters

    • p: ReadonlyVec
    • n: ReadonlyVec
    • w: number

    Returns number

Generated using TypeDoc