API > Bounds
Bounds⚓︎
Represents an axis aligned bounding box. Unity Bounds
Members⚓︎
Properties⚓︎
Name | Description |
---|---|
Bounds .center |
The center of the bounding box. |
Bounds .extents |
The extents of the Bounding Box. This is always half of the size of the Bounds. |
Bounds .max |
The maximal point of the box. This is always equal to center+extents. |
Bounds .min |
The minimal point of the box. This is always equal to center-extents. |
Bounds .size |
The total size of the box. This is always twice as large as the extents. |
Constructor⚓︎
Name | Description |
---|---|
Bounds(center, size) |
Creates a new Bounds. |
Methods⚓︎
Name | Description |
---|---|
Bounds .ClosestPoint(point) |
The closest point on the bounding box. |
Bounds .Contains(point) |
Is point contained in the bounding box? |
Bounds .Encapsulate(point) |
Grows the Bounds to include the point. |
Bounds .Encapsulate(bounds) |
Grow the bounds to encapsulate the bounds. |
Bounds .Expand(amount) |
Expand the bounds by increasing its size by amount along each side. |
Bounds .Expand(amount) |
Expand the bounds by increasing its size by amount along each side. |
Bounds .IntersectRay(ray) |
Does ray intersect this bounding box? |
Bounds .Intersects(bounds) |
Does another bounding box intersect with this bounding box? |
Bounds .SetMinMax(min, max) |
Sets the bounds to the min and max value of the box. |
Bounds .SqrDistance(point) |
The smallest squared distance between the point and this bounding box. |