Plane

A two dimensional surface that extends infinitely in 3d space, represented in Hessian normal form by a unit length normal vector and a constant.

Core Class

A two dimensional surface that extends infinitely in 3d space, represented in Hessian normal form by a unit length normal vector and a constant.

Constructors

Properties

normal: Vector3

(optional) a unit length vector3 defining the normal of the plane.

constant: number

(optional) the signed distance from the origin to the plane.

Methods

  • Sets this plane's normal and constant properties by copying the values from the given normal.

    Parameters

    • normal: Vector3

      a unit length Vector3 defining the normal of the plane.

    • constant: number

      the signed distance from the origin to the plane.

    Returns Plane

  • Set the individual components that define the plane.

    Parameters

    • x: number

      x value of the unit length normal vector.

    • y: number

      y value of the unit length normal vector.

    • z: number

      z value of the unit length normal vector.

    • w: number

      the value of the plane's constant property.

    Returns Plane

  • Defines the plane based on the 3 provided points. The winding order is assumed to be counter-clockwise, and determines the direction of the normal.

    Parameters

    • a: Vector3

      first point on the plane.

    • b: Vector3

      second point on the plane.

    • c: Vector3

      third point on the plane.

    Returns Plane

  • Negates both the normal vector and the constant.

    Returns Plane

  • Returns the signed distance from the point to the plane.

    Parameters

    Returns number

  • Returns the signed distance from the sphere to the plane.

    Parameters

    Returns number

  • Returns the intersection point of the passed line and the plane. Returns null if the line does not intersect. Returns the line's starting point if the line is coplanar with the plane.

    Parameters

    • line: Line3

      the Line3| Line3 to check for intersection.

    • target: Vector3

      the result will be copied into this Vector3.

    Returns Nullable<Vector3>

  • Tests whether a line segment intersects with (passes through) the plane.

    Parameters

    • line: Line3

      the Line3| Line3 to check for intersection.

    Returns boolean

  • Determines whether or not this plane intersects box.

    Parameters

    • box: Box3

      the Box3 to check for intersection.

    Returns boolean

  • Determines whether or not this plane intersects sphere.

    Parameters

    Returns boolean

  • By calculating the projection of the normal vector at the origin onto the plane.

    Parameters

    • target: Vector3

      the result will be copied into this Vector3.

    Returns Vector3

    a Vector3 coplanar to the plane,

  • Apply a Matrix4 to the plane. The matrix must be an affine, homogeneous transform. If supplying an optionalNormalMatrix, it can be created like so: const optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );

    Parameters

    • matrix: Matrix4

      the Matrix4 to apply.

    • optionalNormalMatrix: Matrix3

      (optional) pre-computed normal [Page:Matrix3] of the Matrix4 being applied.

    Returns Plane

  • Translates the plane by the distance defined by the offset vector.

    Parameters

    • offset: Vector3

      the amount to move the plane by.

    Returns Plane

    that this only affects the plane constant and will not affect the normal vector.

  • Checks to see if two planes are equal (their normal and .constant| constant properties match).

    Parameters

    Returns boolean