figureone
    Preparing search index...

    Object representing a plane.

    Contains methods that makes it convenient to operate on planes, points and lines.

    A plane can either be created with:

    • a point on the plane and a normal
    • 3 points on the plane

    If defined with 3 points P1, P2, and P3, then the normal will be in the direction of the cross product of vectors P1P2 and P1P3.

    // define a plane at the origin in the XZ plane
    const p = new Plane([0, 0, 0], [0, 1, 0]);

    // see if a point is on the plane
    const result = p.hasPointOn([1, 0, 1]);

    // find the intersect with a line
    const i = lineIntersect([[0, -0.5, 0], [0, 0.5, 0]])
    Index

    Constructors

    Methods

    • Two planes are considered equal if they are parallel, and the same point exists on both planes.

      If the plane normal direction also needs to be compared, then use includeNormal = true.

      Parameters

      Returns boolean