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

    • Optionalnormal: AcGeVector3d

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

    • Optionalconstant: number

      (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 this

    Return this plane

  • Return a new plane with the same normal and constant as this one.

    Returns AcGePlane

    Return the cloned 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

  • Copy the values of the passed plane's normal and constant properties to this plane.

    Parameters

    Returns this

    Return this plane

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

    Parameters

    Returns number

    Return the caculated distance

  • 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.

  • Negate both the normal vector and the constant.

    Returns this

    Return this plane

  • Normalize the normal vector, and adjusts the constant value accordingly.

    Returns this

    Return this plane

  • 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 this

    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 this

    Return this 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

    Returns this

    Return this plane

  • Set the plane's properties as defined by a normal and an arbitrary coplanar point.

    Parameters

    • normal: AcGeVector3dLike

      Input a unit length Vector3 defining the normal of the plane.

    • point: AcGeVector3d

      Input an arbitrary coplanar point.

    Returns this

    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 this

    Return this plane