Options
All
  • Public
  • Public/Protected
  • All
Menu

Axis aligned bounding box.

Hierarchy

  • b2AABB

Index

Constructors

Properties

lowerBound: b2Vec2

Lower bound.

upperBound: b2Vec2

Upper bound.

Methods

  • Combines two AABBs into one with max values for upper bound and min values for lower bound. The result is stored in this AABB.

    Parameters

    • aabb1: b2AABB

      First AABB to combine.

    • aabb2: b2AABB

      Second AABB to combine.

    Returns void

  • Contains(aabb: b2AABB): boolean
  • Determines if an AABB is contained within this one.

    Parameters

    • aabb: b2AABB

      AABB to see if it is contained.

    Returns boolean

    True if aabb is contained, otherwise false.

  • IsValid(): boolean
  • Verify that the bounds are sorted.

    Returns boolean

    True if the bounds are sorted, otherwise false.

  • TestOverlap(other: b2AABB): boolean
  • Tests if another AABB overlaps this AABB.

    Parameters

    • other: b2AABB

      Other AABB to test for overlap.

    Returns boolean

    True if other overlaps this AABB, otherwise false.

  • Combines two AABBs into one with max values for upper bound and min values for lower bound.

    Parameters

    • aabb1: b2AABB

      First AABB to combine.

    • aabb2: b2AABB

      Second AABB to combine.

    Returns b2AABB

    New AABB with max values from aabb1 and aabb2.

Generated using TypeDoc