One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

BoundingBox

struct · iOS 13.0+ · SDK 27.1

@frozen struct BoundingBox

An axis-aligned bounding box (AABB).

Members (22)

method · iOS 13.0+

intersects

TypeScript
intersects(boundingBox: BoundingBox): boolean
Swift declaration
func intersects(_ boundingBox: BoundingBox) -> Bool

Checks whether the bounding box intersects the specified bounds. - Returns: A Boolean that’s `true` if the box intersects the specified bounds.

method · iOS 13.0+

transformed

TypeScript
transformed(transform: SDKHandle): BoundingBox
Swift declaration
func transformed(by transform: float4x4) -> BoundingBox

Transforms the bounding box and finds the bounds of the result. - Parameters: - transform: The transform to apply to the box. - Returns: The bounds of the transformed box.

get · iOS 13.0+

boundingRadius

TypeScript
get boundingRadius(): number
Swift declaration
var boundingRadius: Float { get }

The radius of a bounding sphere that encompasses the bounding box. This value is 0 if the box is empty.

method · iOS 13.0+

distanceSquared

TypeScript
distanceSquared(toPoint: SDKHandle): number
Swift declaration
func distanceSquared(toPoint: SIMD3<Float>) -> Float

Calculates the distance from a point to the bounding box. - Parameters: - toPoint: The point. - Returns: The square of the distance, in meters, from the point to the box.

get · iOS 13.0+

max

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

The position of the maximum corner of the box.

set · iOS 13.0+

max

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

The position of the maximum corner of the box.

init · iOS 13.0+

init

TypeScript
static initMinMax(min: SDKHandle, max: SDKHandle): BoundingBox
Swift declaration
init(min: SIMD3<Float>, max: SIMD3<Float>)

Creates a bounding box with the given settings. - Parameters: - min: The position of the minimum corner of the box. - max: The position of the maximum corner of the box.

get · iOS 13.0+

min

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

The position of the minimum corner of the box.

set · iOS 13.0+

min

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

The position of the minimum corner of the box.

get · iOS 13.0+

empty

TypeScript
static get empty(): BoundingBox
Swift declaration
static let empty: BoundingBox

An empty bounding box. An empty bounding box is defined with ``min`` set to positive infinity and ``max`` set to negative infinity. - Note: An empty bounding box where ``min`` is greater than ``max`` is different from a bounding box of size 0, where ``min`` is equal to ``max``. The former defines empty space without a position. The latter describes an object of size 0 at a certain position in space.

method · iOS 13.0+

union

TypeScript
union(other: BoundingBox): BoundingBox
Swift declaration
func union(_ other: BoundingBox) -> BoundingBox

Creates a bounding box containing the current bounds and the specified bounds. - Parameters: - other: Another bounding box. - Returns: The new bounding box.

method · iOS 13.0+

union

TypeScript
union54674(point: SDKHandle): BoundingBox
Swift declaration
func union(_ point: SIMD3<Float>) -> BoundingBox

Creates a bounding box containing the current bounds and the specified point. - Parameters: - point: A point in space. - Returns: The new bounding box.

get · iOS 13.0+

center

TypeScript
get center(): SDKHandle
Swift declaration
var center: SIMD3<Float> { get }

The center of the bounding box. This value is (0, 0, 0) if the box is empty.

get · iOS 13.0+

extents

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

The extents of the bounding box. This value is (0, 0, 0) if the box is empty.

get · iOS 13.0+

isEmpty

TypeScript
get isEmpty(): boolean
Swift declaration
var isEmpty: Bool { get }

A Boolean that indicates whether the bounding box is empty. This value is `true` if the box is empty.

method · iOS 13.0+

contains

TypeScript
contains(boundingBox: BoundingBox): boolean
Swift declaration
func contains(_ boundingBox: BoundingBox) -> Bool

Checks whether the bounding box contains the specified bounds. - Returns: A Boolean that’s `true` if the box contains the specified bounds.

method · iOS 13.0+

contains

TypeScript
contains32870(point: SDKHandle): boolean
Swift declaration
func contains(_ point: SIMD3<Float>) -> Bool

Checks whether the bounding box contains the specified point. - Returns: A Boolean that’s `true` if the box contains the specified point.

method · iOS 13.0+

formUnion

TypeScript
formUnion(other: BoundingBox): void
Swift declaration
mutating func formUnion(_ other: BoundingBox)

Expands the bounding box to contain the specified bounds. - Parameters: - other: Another bounding box.

method · iOS 13.0+

formUnion

TypeScript
formUnion24355(point: SDKHandle): void
Swift declaration
mutating func formUnion(_ point: SIMD3<Float>)

Expands the bounding box to contain the specified point. - Parameters: - point: A point in space.

method · iOS 13.0+

transform

TypeScript
transform(transform: SDKHandle): void
Swift declaration
mutating func transform(by transform: float4x4)

Transforms the bounding box. - Parameters: - transform: The transform to apply to the box.

init · iOS 13.0+

init

TypeScript
static init(): BoundingBox
Swift declaration
init()

Creates an empty bounding box.

init · iOS 18.0+

init

TypeScript
static init89264(rect3D: _Spatial_Rect3D): BoundingBox
Swift declaration
init(_ rect3D: Rect3D)

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →