<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/BoundingBox",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation11BoundingBoxV"
  },
  "title" : "BoundingBox"
}
-->

# BoundingBox

An axis-aligned bounding box (AABB).

```
@frozen struct BoundingBox
```

## Topics

### Creating a bounding box

[`init()`](/documentation/RealityKit/BoundingBox/init())

Creates an empty bounding box.

[`init(min:max:)`](/documentation/RealityKit/BoundingBox/init(min:max:))

Creates a bounding box with the given settings.

### Getting an empty box

[`empty`](/documentation/RealityKit/BoundingBox/empty)

An empty bounding box.

### Getting the box characteristics

[`max`](/documentation/RealityKit/BoundingBox/max)

The position of the maximum corner of the box.

[`min`](/documentation/RealityKit/BoundingBox/min)

The position of the minimum corner of the box.

[`center`](/documentation/RealityKit/BoundingBox/center)

The center of the bounding box.

[`extents`](/documentation/RealityKit/BoundingBox/extents)

The extents of the bounding box.

[`boundingRadius`](/documentation/RealityKit/BoundingBox/boundingRadius)

The radius of a bounding sphere that encompasses the bounding box.

### Expanding boxes

[`union(_:)`](/documentation/RealityKit/BoundingBox/union(_:)-1y8hw)

Creates a bounding box containing the current bounds and the specified
bounds.

[`formUnion(_:)`](/documentation/RealityKit/BoundingBox/formUnion(_:)-5iy03)

Expands the bounding box to contain the specified bounds.

[`union(_:)`](/documentation/RealityKit/BoundingBox/union(_:)-g4th)

Creates a bounding box containing the current bounds and the specified
point.

[`formUnion(_:)`](/documentation/RealityKit/BoundingBox/formUnion(_:)-6itj9)

Expands the bounding box to contain the specified point.

### Checking for overlap

[`contains(_:)`](/documentation/RealityKit/BoundingBox/contains(_:)-5ux4h)

Checks whether the bounding box contains the specified bounds.

[`contains(_:)`](/documentation/RealityKit/BoundingBox/contains(_:)-92ap6)

Checks whether the bounding box contains the specified point.

[`intersects(_:)`](/documentation/RealityKit/BoundingBox/intersects(_:))

Checks whether the bounding box intersects the specified bounds.

### Checking for separation

[`distanceSquared(toPoint:)`](/documentation/RealityKit/BoundingBox/distanceSquared(toPoint:))

Calculates the distance from a point to the bounding box.

### Transforming a bounding box

[`transform(by:)`](/documentation/RealityKit/BoundingBox/transform(by:))

Transforms the bounding box.

[`transformed(by:)`](/documentation/RealityKit/BoundingBox/transformed(by:))

Transforms the bounding box and finds the bounds of the result.

### Comparing bounding boxes

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`Sendable`](/documentation/Swift/Sendable)

[`Encodable`](/documentation/Swift/Encodable)

[`Escapable`](/documentation/Swift/Escapable)

[`Decodable`](/documentation/Swift/Decodable)

[`Copyable`](/documentation/Swift/Copyable)

[`Equatable`](/documentation/Swift/Equatable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)