ProtoTwin API
    Preparing search index...

    Class Plane

    Immutable plane.

    Implements

    Index

    Constructors

    • Constructor

      Parameters

      • origin: Vec3

        The origin.

      • normal: Vec3

        The normal.

      • firstAxis: Vec3

        The first axis.

      Returns Plane

    Properties

    firstAxis: Vec3

    The first axis of the plane.

    normal: Vec3

    The normal of the plane.

    origin: Vec3

    The origin of the plane.

    xy: Plane = ...

    Plane aligned with the x and y axes, with normal in the z axis.

    yz: Plane = ...

    Plane aligned with the y and z axes, with normal in the x axis.

    zx: Plane = ...

    Plane aligned with the z and x axes, with normal in the y axis.

    Methods

    • Converts a 2D coordinate in the plane's local coordinate system to a 3D point.

      Parameters

      • coordinate: IVec2

        The 2D coordinate.

      Returns Vec3

      The corresponding 3D point.

    • Projects a point onto the plane.

      Parameters

      Returns Vec3

      The projected point.

    • Calculates the angle for the specified point when projected onto the plane.

      Parameters

      Returns number

      The angle for the projected point.

      The angle is measured from the first axis about the normal in a right-handed sense.

    • Determines whether two planes are exactly equal.

      Parameters

      Returns boolean

      True if the two planes are exactly equal, false otherwise.