Skip to content

API > Bounds


Bounds⚓︎

Represents an axis aligned bounding box. Unity Bounds

Members⚓︎

Properties⚓︎

Name Description
Bounds.centerProperty The center of the bounding box.
Bounds.extentsProperty The extents of the Bounding Box. This is always half of the size of the Bounds.
Bounds.maxProperty The maximal point of the box. This is always equal to center+extents.
Bounds.minProperty The minimal point of the box. This is always equal to center-extents.
Bounds.sizeProperty The total size of the box. This is always twice as large as the extents.

Constructor⚓︎

Name Description
Bounds(center, size)Constructor Creates a new Bounds.

Methods⚓︎

Name Description
Bounds.ClosestPoint(point) Method The closest point on the bounding box.
Bounds.Contains(point) Method Is point contained in the bounding box?
Bounds.Encapsulate(point) Method Grows the Bounds to include the point.
Bounds.Encapsulate(bounds) Method Grow the bounds to encapsulate the bounds.
Bounds.Expand(amount) Method Expand the bounds by increasing its size by amount along each side.
Bounds.Expand(amount) Method Expand the bounds by increasing its size by amount along each side.
Bounds.IntersectRay(ray) Method Does ray intersect this bounding box?
Bounds.Intersects(bounds) Method Does another bounding box intersect with this bounding box?
Bounds.SetMinMax(min, max) Method Sets the bounds to the min and max value of the box.
Bounds.SqrDistance(point) Method The smallest squared distance between the point and this bounding box.