Contents

PortalComponent.Volume

A box-shaped region in portal-local space that defines a volumetric portal boundary.

Declaration

struct Volume

Overview

Pair this type with PortalComponent.ClippingMode.volume(_:) to clip portal world content to a box, or with PortalComponent.CrossingMode.volume(_:) to allow crossing entities to pass through the box’s faces.

PortalComponent.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 enclosingBox(depth:), which derives the X and Y extents from the portal’s PortalComponent.SurfaceStyle for you.

Topics

Creating a volume

Configuring the extents

Instance Properties