Matter.Bounds
The Matter.Bounds module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).
Methods
Matter.Bounds.contains
(bounds, point)
Returns true if the bounds contains the given point.
Returns
Boolean
True if the bounds contain the point, otherwise false
Matter.Bounds.create
(vertices)
Creates a new axis-aligned bounding box (AABB) for the given vertices.
Parameters
-
verticesVertices
Returns
Bounds
A new bounds object
Matter.Bounds.overlaps
(boundsA, boundsB)
Returns true if the two bounds intersect.
Returns
Boolean
True if the bounds overlap, otherwise false
Matter.Bounds.shift
(bounds, position)
Shifts the bounds to the given position.
Matter.Bounds.translate
(bounds, vector)
Translates the bounds by the given vector.