Axis Aligned collision primitive for Excalibur.
Constructor allows passing of either an object with all coordinate components, or the coordinate components passed separately.
Either x coordinate of the left edge or an options object containing the four coordinate components.
y coordinate of the top edge
x coordinate of the right edge
y coordinate of the bottom edge
Returns the center of the bounding box
Returns the calculated height of the bounding box
Returns the calculated width of the bounding box
Returns the perimeter of the bounding box
Test wether this bounding box intersects with another returning the intersection vector that can be used to resolve the collision. If there is no intersection null is returned.
A Vector in the direction of the current BoundingBox, this <- other
Determines whether a ray intersects with a bounding box
Rotates a bounding box by and angle and around a point, if no point is specified (0, 0) is used by default. The resulting bounding box is also axis-align. This is useful when a new axis-aligned bounding box is needed for rotated geometry.