<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RealityKit",
  "identifier" : "/documentation/RealityKit/PortalComponent/ClippingMode-swift.enum/volume(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "RealityKit"
    ],
    "preciseIdentifier" : "s:17RealityFoundation15PortalComponentV12ClippingModeO6volumeyAeC6VolumeVcAEmF"
  },
  "title" : "PortalComponent.ClippingMode.volume(_:)"
}
-->

# PortalComponent.ClippingMode.volume(_:)

Clips the contents within the portal to a box-shaped region.

```
case volume(PortalComponent.Volume)
```

## Parameters

`volume`

A [`PortalComponent.Volume`](/documentation/RealityKit/PortalComponent/Volume) describing the box’s center and extents
in portal-local space.

## Discussion

Use this case for room-sized portals and other bounded portal spaces where content
shouldn’t extend infinitely behind the portal surface. RealityKit hides any portal
world content outside the volume.

For portals where the box should enclose the portal surface,
[`enclosingBox(depth:)`](/documentation/RealityKit/PortalComponent/BoundaryStyle/enclosingBox(depth:)) is a convenient way to configure this case
alongside the matching [`PortalComponent.CrossingMode.volume(_:)`](/documentation/RealityKit/PortalComponent/CrossingMode-swift.enum/volume(_:)).

---

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)