ProtoTwin API
    Preparing search index...

    Class Aabb

    Immutable axis-aligned bounding box.

    Implements

    Index

    Constructors

    • Constructor.

      Parameters

      • min: Vec3

        The minimum point.

      • max: Vec3

        The maximum point.

      Returns Aabb

    Properties

    max: Vec3

    The maximum point.

    min: Vec3

    The minimum point.

    Methods

    • Calculates the bounding box center.

      Returns Vec3

      The center of the bounding box.

    • Calculates the bounding box dimensions.

      Returns Vec3

      The dimensions of the bounding box.

    • Whether the bounding box has dimensions of zero.

      Parameters

      • aabb: IAabb

        The bounding box.

      Returns boolean

      True if the bounding box is empty, false otherwise.

    • Expands the bounding box to include the specified point.

      Parameters

      • aabb: IAabb

        The bounding box.

      • point: IVec3

        The point to include.

      Returns Aabb

      The expanded bounding box, that includes the point.

    • Creates a bounding box that is the intersection of two bounding boxes.

      Parameters

      • a: IAabb

        The first bounding box.

      • b: IAabb

        The second bounding box.

      Returns Aabb

      The intersection of the two bounding boxes.

    • Creates a bounding box that is the union of two bounding boxes.

      Parameters

      • a: IAabb

        The first bounding box.

      • b: IAabb

        The second bounding box.

      Returns Aabb

      The union of the two bounding boxes.