One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

PortalComponent.Volume

struct · iOS 27.0+ · SDK 27.1

struct Volume

A box-shaped region in portal-local space that defines a volumetric portal boundary. Pair this type with ``ClippingMode-swift.enum/volume(_:)`` to clip portal world content to a box, or with ``CrossingMode-swift.enum/volume(_:)`` to allow crossing entities to pass through the box's faces. ``Volume`` describes an axis-aligned box in the portal entity's local coordinate space. The box is centered at ``position`` and spans the full lengths given by ``extents`` along each axis. ``extents`` are full extents, not half-extents — a volume with `extents = [1, 1, 1]` is a one-cubic-meter box. For typical room-sized portals where the box should enclose the portal surface, prefer ``BoundaryStyle/enclosingBox(depth:)``, which derives the X and Y extents from the portal's ``SurfaceStyle`` for you.

Members (5)

get · iOS 27.0+

extents

TypeScript
get extents(): SDKHandle
Swift declaration
var extents: SIMD3<Float>

The full lengths of the volume along the X, Y, and Z axes of portal-local space, in meters.

set · iOS 27.0+

extents

TypeScript
set extents(value: SDKHandle)
Swift declaration
var extents: SIMD3<Float>

The full lengths of the volume along the X, Y, and Z axes of portal-local space, in meters.

init · iOS 27.0+

init

TypeScript
static init(position: SDKHandle, extents: SDKHandle): PortalComponent_Volume
Swift declaration
init(position: SIMD3<Float> = .zero, extents: SIMD3<Float>)

Creates a volume with the given center position and extents. - Parameters: - position: The center of the volume in portal-local space, in meters. Defaults to `.zero`. - extents: The full lengths (width, height, depth) of the volume in portal-local space, in meters.

get · iOS 27.0+

position

TypeScript
get position(): SDKHandle
Swift declaration
var position: SIMD3<Float>

The center of the volume in portal-local space, in meters. Defaults to `.zero`, which places the box center at the portal entity's origin.

set · iOS 27.0+

position

TypeScript
set position(value: SDKHandle)
Swift declaration
var position: SIMD3<Float>

The center of the volume in portal-local space, in meters. Defaults to `.zero`, which places the box center at the portal entity's origin.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →