Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a plane by the equation ax + by + cz + d = 0

Hierarchy

  • Plane

Index

Constructors

  • new Plane(a: number, b: number, c: number, d: number): Plane
  • Creates a Plane object according to the given floats a, b, c, d and the plane equation : ax + by + cz + d = 0

    Parameters

    • a: number

      a component of the plane

    • b: number

      b component of the plane

    • c: number

      c component of the plane

    • d: number

      d component of the plane

    Returns Plane

Properties

d: number

d component of the plane

normal: Vector3

Normal of the plane (a,b,c)

Methods

  • asArray(): number[]
  • Returns number[]

    the plane coordinates as a new array of 4 elements [a, b, c, d].

  • Returns Plane

    a new plane copied from the current Plane.

  • Compute the dot product between the point and the plane normal

    Parameters

    Returns number

    the dot product (float) of the point coordinates and the plane normal.

  • getClassName(): string
  • Returns string

    the string "Plane".

  • getHashCode(): number
  • Returns number

    the Plane hash code.

  • Checks if the plane is facing a given direction (meaning if the plane's normal is pointing in the opposite direction of the given vector). Note that for this function to work as expected you should make sure that:

    • direction and the plane normal are normalized
    • epsilon is a number just bigger than -1, something like -0.99 for eg

    Parameters

    • direction: DeepImmutableObject<Vector3>

      the direction to check if the plane is facing

    • epsilon: number

      value the dot product is compared against (returns true if dot <= epsilon)

    Returns boolean

    True if the plane is facing the given direction

  • Normalize the current Plane in place.

    Returns Plane

    the updated Plane.

  • Calculates the distance to a point

    Parameters

    Returns number

    the signed distance (float) from the given point to the Plane.

  • Applies a transformation the plane and returns the result

    Parameters

    Returns Plane

    a new Plane as the result of the transformation of the current Plane by the given matrix.

  • Creates a plane from an array

    Parameters

    Returns Plane

    a new Plane from the given array.

  • Creates a plane from an origin point and a normal

    Parameters

    Returns Plane

    a new Plane the normal vector to this plane at the given origin point. Note : the vector "normal" is updated because normalized.

  • Calculates the distance from a plane and a point

    Parameters

    Returns number

    the signed distance between the plane defined by the normal vector at the "origin"" point and the given other point.

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme