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 a new instance of BoundingBox that is a copy of the current instance
Combines this bounding box and another together returning a new bounding box
The bounding box to combine
Tests whether a point is contained within the bounding box
The point to test
Tests whether another bounding box is totally contained in this one
The bounding box to test
Draw a debug bounding box
Returns the perimeter of the bounding box
Return whether the bounding box has zero dimensions in height,width or both
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.
Other BoundingBox to test intersection with
A Vector in the direction of the current BoundingBox, this <- other
Test whether the bounding box has intersected with another bounding box, returns the side of the current bb that intersected.
The other actor to test
Returns true if the bounding boxes overlap.
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.
Scale a bounding box by a scale factor, optionally provide a point
Transform the axis aligned bounding box by a Matrix, producing a new axis aligned bounding box
Axis Aligned collision primitive for Excalibur.