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 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
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
Other BoundingBox to test intersection with
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.
Optional
epsilon: numberOptionally specify a small epsilon (default 0) as amount of overlap to ignore as overlap. This epsilon is useful in stable collision simulations.
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
Static
fromStatic
fromStatic
get
Axis Aligned collision primitive for Excalibur.