# BBox

An Axis Aligned Bounding Box.

- Kind: struct
- Assembly: `Sandbox.System`
- Modifiers: sealed

## Constructors

- [`BBox`](/api/BBox/.ctor): Initialize an AABB with given mins and maxs corners. See [Vector3.Sort](/api/Vector3/Sort).

## Fields

- [`Maxs`](/api/BBox/Maxs): The maximum corner extents of the AABB. Values on each axis should be mathematically larger than values on the same axis of [BBox.Mins](/api/BBox/Mins). See [Vector3.Sort](/api/Vector3/Sort)
- [`Mins`](/api/BBox/Mins): The minimum corner extents of the AABB. Values on each axis should be mathematically smaller than values on the same axis of [BBox.Maxs](/api/BBox/Maxs). See [Vector3.Sort](/api/Vector3/Sort)

## Properties

- [`Center`](/api/BBox/Center): Calculated center of the AABB.
- [`Corners`](/api/BBox/Corners): An enumerable that contains all corners of this AABB.
- [`Extents`](/api/BBox/Extents): The extents of the bbox. This is half the size.
- [`RandomPointInside`](/api/BBox/RandomPointInside): Returns a random point within this AABB.
- [`RandomPointOnEdge`](/api/BBox/RandomPointOnEdge): Returns a random point within this AABB.
- [`Size`](/api/BBox/Size): Calculated size of the AABB on each axis.
- [`Volume`](/api/BBox/Volume): Returns the physical volume of this AABB.

## Methods

- [`AddBBox`](/api/BBox/AddBBox): Returns this bbox but stretched to include given bbox
- [`AddPoint`](/api/BBox/AddPoint): Returns this bbox but stretched to include given point
- [`ClosestPoint`](/api/BBox/ClosestPoint): Returns the closest point on this AABB to another point
- [`Contains`](/api/BBox/Contains): Returns true if this AABB completely contains given AABB
- [`FromBoxes`](/api/BBox/FromBoxes)
- [`FromHeightAndRadius`](/api/BBox/FromHeightAndRadius): Creates an AABB of `radius` length and depth, and given `height`
- [`FromPoints`](/api/BBox/FromPoints)
- [`FromPositionAndSize`](/api/BBox/FromPositionAndSize): Creates an AABB at given position `center` and given `size` which acts as a diameter of a sphere contained within the AABB.
- [`GetEdgeDistance`](/api/BBox/GetEdgeDistance): Calculates the shortest distance from the specified local position to the nearest edge of the shape.
- [`GetVolume`](/api/BBox/GetVolume): Get the volume of this AABB
- [`Grow`](/api/BBox/Grow): Return a slightly bigger box
- [`Overlaps`](/api/BBox/Overlaps): Returns true if this AABB somewhat overlaps given AABB
- [`Rotate`](/api/BBox/Rotate): Rotate this box by this amount and return
- [`Snap`](/api/BBox/Snap): Snap this AABB to a grid
- [`Trace`](/api/BBox/Trace): Trace a ray against this box. If hit then return the distance.
- [`Transform`](/api/BBox/Transform): Transform this box by this amount and return
- [`Translate`](/api/BBox/Translate): Move this box by this amount and return
