The shape of a portal's clipping and crossing boundary.
A portal has two related but separate concepts:
- The *surface*, a flat plane mesh that RealityKit renders with ``PortalMaterial`` and
sizes from ``SurfaceStyle``.
- The *boundary*, the volume in space that clips portal world content and that
crossing entities pass through. ``BoundaryStyle`` describes the shape of that volume.
Pair a boundary style with a ``BoundaryMode`` to control whether the boundary clips
content, allows entities to cross, both, or neither.
Returns a boundary style that uses a box enclosing the portal surface.
The box is centered on the portal entity's origin. Its X and Y extents come from the
accompanying ``SurfaceStyle``; its Z extent is the `depth` you provide.
Use this style for room-sized portals and other bounded portal spaces where content
shouldn't extend infinitely behind the surface. Entities with
``PortalCrossingComponent`` cross the box's faces rather than an infinite plane.
This boundary corresponds to ``ClippingMode-swift.enum/volume(_:)``
and ``CrossingMode-swift.enum/volume(_:)``. To offset the box from the portal entity's
origin, configure those modes directly with a ``Volume`` that has a non-zero `position`.
- Parameter depth: The depth of the box in meters, along the entity's local Z axis.
Returns a boundary style that uses an infinite plane.
The boundary is the entity's local XY plane. RealityKit clips portal world content
behind the surface and lets crossing entities pass through it freely.
This boundary corresponds to ``ClippingMode-swift.enum/plane(_:)``
and ``CrossingMode-swift.enum/plane(_:)`` configured with ``Plane/positiveZ``.