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

  • Create one plane

    Parameters

    • normal: AcGeVector3d = ...

      (optional) Input a unit length Vector3 defining the normal of the plane. Default is (1, 0, 0).

    • constant: number = 0

      (optional) Input the signed distance from the origin to the plane. Default is 0.

    Returns AcGePlane

Properties

constant: number
normal: AcGeVector3d

Methods

  • 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: AcGeMatrix3d

      Input the Matrix4 to apply.

    • optionalNormalMatrix: AcGeMatrix2d

      (optional) Input pre-computed normal Matrix3 of the Matrix4 being applied.

    Returns AcGePlane

    Return this plane

  • Returns a 3d vector coplanar to the plane, by calculating the projection of the normal vector at the origin onto the plane.

    Parameters

    • target: AcGeVector3d

      Input the result will be copied into this 3d vector.

    Returns AcGeVector3d

    Return the 3d vector coplanar to the plane

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

    Parameters

    • plane: AcGePlane

      Input the plane to compare with this one.

    Returns boolean

    Return true if two planes are equal

  • Determine whether or not this plane intersects box.

    Parameters

    • box: AcGeBox3d

      Input the 3d box to check for intersection.

    Returns boolean

    Return true if this plane intersects the specified 3d box.

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

    Parameters

    • normal: AcGeVector3dLike

      Input a unit length 3d vector defining the normal of the plane.

    • constant: number

      Input the signed distance from the origin to the plane.

    Returns AcGePlane

    Return this plane

  • Set the individual components that define the plane.

    Parameters

    • x: number

      Input x value of the unit length normal vector.

    • y: number

      Input y value of the unit length normal vector.

    • z: number

      Input z value of the unit length normal vector.

    • w: number

      Input the value of the plane's constant property.

    Returns AcGePlane

    Return this plane

  • Translates the plane by the distance defined by the offset vector. Note that this only affects the plane constant and will not affect the normal vector.

    Parameters

    Returns AcGePlane

    Return this plane