One Logo Pool Ball
Spatial · IOS API REFERENCE

Rect3D

struct · iOS 16.0+ · SDK 27.1

struct Rect3D

Members (68)

method · iOS 16.0+

applying

TypeScript
applying(transform: AffineTransform3D): Rect3D
Swift declaration
func applying(_ transform: AffineTransform3D) -> Rect3D
method · iOS 16.0+

applying

TypeScript
applying92335(transform: ProjectiveTransform3D): Rect3D
Swift declaration
func applying(_ transform: ProjectiveTransform3D) -> Rect3D
method · iOS 16.0+

contains

TypeScript
containsPoint(other: Point3D): boolean
Swift declaration
func contains(point other: Point3D) -> Bool
method · iOS 16.0+

contains

TypeScript
contains(other: Rect3D): boolean
Swift declaration
func contains(_ other: Rect3D) -> Bool
get · iOS 16.0+

center

TypeScript
get center(): Point3D
Swift declaration
var center: Point3D { get }
get · iOS 16.0+

max

TypeScript
get max(): Point3D
Swift declaration
var max: Point3D { get }
get · iOS 16.0+

min

TypeScript
get min(): Point3D
Swift declaration
var min: Point3D { get }
method · iOS 16.0+

inset

TypeScript
inset(dXYZ: Size3D): Rect3D
Swift declaration
func inset(by dXYZ: Size3D) -> Rect3D
get · iOS 16.0+

integral

TypeScript
get integral(): Rect3D
Swift declaration
var integral: Rect3D { get }
method · iOS 16.0+

intersects

TypeScript
intersects(other: Rect3D): boolean
Swift declaration
func intersects(_ other: Rect3D) -> Bool
get · iOS 16.0+

isEmpty

TypeScript
get isEmpty(): boolean
Swift declaration
var isEmpty: Bool { get }
get · iOS 16.0+

isFinite

TypeScript
get isFinite(): boolean
Swift declaration
var isFinite: Bool { get }
get · iOS 16.0+

isNaN

TypeScript
get isNaN(): boolean
Swift declaration
var isNaN: Bool { get }
get · iOS 16.0+

isZero

TypeScript
get isZero(): boolean
Swift declaration
var isZero: Bool { get }
init · iOS 16.0+

init

TypeScript
static initCenterSize(center: Point3D, size: Size3D): Rect3D
Swift declaration
init(center: Point3D, size: Size3D)
init · iOS 16.0+

init

TypeScript
static initOriginSize(origin: Point3D, size: Size3D): Rect3D
Swift declaration
init(origin: Point3D, size: Size3D)
method · iOS 16.0+

rotated

TypeScript
rotatedBy(rotation: Rotation3D): Rect3D
Swift declaration
func rotated(by rotation: Rotation3D) -> Rect3D
method · iOS 16.0+

rotated

TypeScript
rotatedByAround(rotation: Rotation3D, pivot: Point3D): Rect3D
Swift declaration
func rotated(by rotation: Rotation3D, around pivot: Point3D) -> Rect3D
method · iOS 16.0+

rotated

TypeScript
rotatedBy83504(quaternion: SDKHandle): Rect3D
Swift declaration
func rotated(by quaternion: simd_quatd) -> Rect3D
method · iOS 16.0+

rotated

TypeScript
rotatedByAround39598(quaternion: SDKHandle, pivot: Point3D): Rect3D
Swift declaration
func rotated(by quaternion: simd_quatd, around pivot: Point3D) -> Rect3D
method · iOS 16.0+

scaled

TypeScript
scaled(scale: Size3D): Rect3D
Swift declaration
func scaled(by scale: Size3D) -> Rect3D
method · iOS 16.0+

uniformlyScaled

TypeScript
uniformlyScaled(scale: number): Rect3D
Swift declaration
func uniformlyScaled(by scale: Double) -> Rect3D
get · iOS 16.0+

standardized

TypeScript
get standardized(): Rect3D
Swift declaration
var standardized: Rect3D { get }
method · iOS 16.0+

translated

TypeScript
translatedBy(offset: Vector3D): Rect3D
Swift declaration
func translated(by offset: Vector3D) -> Rect3D
method · iOS 16.0+

union

TypeScript
union(other: Rect3D): Rect3D
Swift declaration
func union(_ other: Rect3D) -> Rect3D
get · iOS 16.0+

origin

TypeScript
get origin(): Point3D
Swift declaration
var origin: Point3D
set · iOS 16.0+

origin

TypeScript
set origin(value: Point3D)
Swift declaration
var origin: Point3D
get · iOS 16.0+

size

TypeScript
get size(): Size3D
Swift declaration
var size: Size3D
set · iOS 16.0+

size

TypeScript
set size(value: Size3D)
Swift declaration
var size: Size3D
get · iOS 16.0+

infinity

TypeScript
static get infinity(): Rect3D
Swift declaration
static let infinity: Rect3D
get · iOS 16.0+

zero

TypeScript
static get zero(): Rect3D
Swift declaration
static let zero: Rect3D
init · iOS 16.0+

init

TypeScript
static initOriginSize65198(origin: Point3D, size: Size3D): Rect3D
Swift declaration
init(origin: Point3D, size: Size3D)
method · iOS 16.0+

translated

TypeScript
translatedBy59021(size: Size3D): Rect3D
Swift declaration
func translated(by size: Size3D) -> Rect3D

Returns the entity translated by the specified size. - Parameter size: The size structure that defines that translation.

method · iOS 18.0+

unapplying

TypeScript
unapplying(scaledPose: ScaledPose3D): Rect3D
Swift declaration
func unapplying(_ scaledPose: ScaledPose3D) -> Rect3D

Returns the primitive that results from applying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive. - Note: The pose's rotation angle must be zero, otherwise this function returns `self`.

method · iOS 16.0+

unapplying

TypeScript
unapplying3453(transform: AffineTransform3D): Rect3D
Swift declaration
func unapplying(_ transform: AffineTransform3D) -> Rect3D

Unapplies an affine transform. - Parameter transform: The affine transform. - Note: The transform must be rectilinear otherwise this function returns `self`.

method · iOS 16.0+

unapplying

TypeScript
unapplying35784(transform: ProjectiveTransform3D): Rect3D
Swift declaration
func unapplying(_ transform: ProjectiveTransform3D) -> Rect3D

Unapplies a projective transform. - Parameter transform: The projective transform. - Note: The transform must be rectilinear otherwise this function returns `self`.

method · iOS 16.0+

unapplying

TypeScript
unapplying39689(pose: Pose3D): Rect3D
Swift declaration
func unapplying(_ pose: Pose3D) -> Rect3D

Returns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive. - Note: The pose's rotation angle must be zero, otherwise this function returns `self`.

method · iOS 16.0+

containsAny

TypeScript
containsAny(points: Array<Point3D>): boolean
Swift declaration
func containsAny(of points: [Point3D]) -> Bool

Returns a Boolean value that indicates whether this volume contains any of the specified points. - Parameter points: An array of points. - Returns A Boolean value that indicates whether `self` contains any of the specified points.

get · iOS 16.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 16.0+

cornerPoints

TypeScript
get cornerPoints(): Array<Point3D>
Swift declaration
var cornerPoints: [Point3D] { get }

Returns the corner points of the rectangle. This function returns the vertices in a clockwise direction, starting from the origin: 5-----6 | | 1-----2 | | | | | y z | 4--|--7 | / | | |/ 0-----3 +-- x For example, `points[0]` equals `rect.origin`, and `points[6]` is at `rect.origin` offset by `rect.size`.

get · iOS 18.0+

customMirror

TypeScript
get customMirror(): SDKHandle
Swift declaration
var customMirror: Mirror { get }

The custom mirror for this instance.

method · iOS 16.0+

intersection

TypeScript
intersection(other: Rect3D): (Rect3D) | null
Swift declaration
func intersection(_ other: Rect3D) -> Rect3D?

Returns the intersection of two rectangles. - Parameter other: The second rectangle. - Returns The intersection of `self` and `other`.

get · iOS 17.0+

maxX

TypeScript
get maxX(): number
Swift declaration
var maxX: Double { get }

Returns the largest value of the x-coordinate for the rectangle.

get · iOS 17.0+

maxY

TypeScript
get maxY(): number
Swift declaration
var maxY: Double { get }

Returns the largest value of the y-coordinate for the rectangle.

get · iOS 17.0+

maxZ

TypeScript
get maxZ(): number
Swift declaration
var maxZ: Double { get }

Returns the largest value of the z-coordinate for the rectangle.

get · iOS 17.0+

midX

TypeScript
get midX(): number
Swift declaration
var midX: Double { get }

Returns the x-coordinate that establishes the center of a rectangle.

get · iOS 17.0+

midY

TypeScript
get midY(): number
Swift declaration
var midY: Double { get }

Returns the y-coordinate that establishes the center of a rectangle.

get · iOS 17.0+

midZ

TypeScript
get midZ(): number
Swift declaration
var midZ: Double { get }

Returns the z-coordinate that establishes the center of a rectangle.

get · iOS 17.0+

minX

TypeScript
get minX(): number
Swift declaration
var minX: Double { get }

Returns the smallest value for the x-coordinate of the rectangle.

get · iOS 17.0+

minY

TypeScript
get minY(): number
Swift declaration
var minY: Double { get }

Returns the smallest value for the y-coordinate of the rectangle.

get · iOS 17.0+

minZ

TypeScript
get minZ(): number
Swift declaration
var minZ: Double { get }

Returns the smallest value for the z-coordinate of the rectangle.

init · iOS 16.0+

init

TypeScript
static initCenterSize80186(center: Vector3D, size: Vector3D): Rect3D
Swift declaration
init(center: Vector3D = .zero, size: Vector3D)

Creates a rectangle from Spatial vectors that describe the center and size. - Parameter center: The center of the rectangle. - Parameter size: The size of the rectangle.

init · iOS 16.0+

init

TypeScript
static initCenterSize67077(center: SDKHandle, size: SDKHandle): Rect3D
Swift declaration
init(center: simd_double3 = .zero, size: simd_double3)

Creates a rectangle from simd vectors that describe the center and size. - Parameter center: The center of the rectangle. - Parameter size: The size of the rectangle.

init · iOS 16.0+

init

TypeScript
static initCenterSize55647(center: SDKHandle, size: SDKHandle): Rect3D
Swift declaration
init(center: simd_float3 = .zero, size: simd_float3)

Creates a rectangle from single-precision vectors that describe the center and size. - Parameter center: The center of the rectangle. - Parameter size: The size of the rectangle. - note: This function is provided as a convenience. All Spatial storage and calculations are double-precision.

init · iOS 16.0+

init

TypeScript
static initOriginSize30819(origin: Vector3D, size: Vector3D): Rect3D
Swift declaration
init(origin: Vector3D = .zero, size: Vector3D)

Creates a rectangle from Spatial vectors that describe the origin and size. - Parameter origin: The origin of the rectangle. - Parameter size: The size of the rectangle.

init · iOS 16.0+

init

TypeScript
static initOriginSize72206(origin: SDKHandle, size: SDKHandle): Rect3D
Swift declaration
init(origin: simd_double3 = .zero, size: simd_double3)

Creates a rectangle from simd vectors that describe the origin and size. - Parameter origin: The origin of the rectangle. - Parameter size: The size of the rectangle.

init · iOS 16.0+

init

TypeScript
static initOriginSize91456(origin: SDKHandle, size: SDKHandle): Rect3D
Swift declaration
init(origin: simd_float3 = .zero, size: simd_float3)

Creates a rectangle from single-precision vectors that describe the origin and size. - Parameter origin: The origin of the rectangle. - Parameter size: The size of the rectangle. - note: This function is provided as a convenience. All Spatial storage and calculations are double-precision.

init · iOS 16.0+

init

TypeScript
static initPoints(points: Array<Point3D>): Rect3D
Swift declaration
init(points: [Point3D])

Creates a rectangle that's the bounding box of the specified points. - Parameter points: The array of points. - Precondition: The `points` array must contain at least one element.

method · iOS 16.0+

sheared

TypeScript
sheared(shear: AxisWithFactors): Rect3D
Swift declaration
func sheared(_ shear: AxisWithFactors) -> Rect3D

Returns a sheared rectangle. - Parameter shear: The axis and shear factors. - Returns The sheared rectangle. Because affine transforms do not preserve rectangles in general, this function returns the smallest rectangle that contains the transformed corner points of the rect parameter.

method · iOS 18.0+

applying

TypeScript
applying22312(scaledPose: ScaledPose3D): Rect3D
Swift declaration
func applying(_ scaledPose: ScaledPose3D) -> Rect3D

Returns the primitive that results from applying a scaled pose to the primitive. - Parameter pose: The scaled pose. - Returns The transformed primitive.

method · iOS 16.0+

applying

TypeScript
applying23769(pose: Pose3D): Rect3D
Swift declaration
func applying(_ pose: Pose3D) -> Rect3D

Returns the primitive that results from applying a pose to the primitive. - Parameter pose: The pose. - Returns The transformed primitive.

method · iOS 16.0+

contains

TypeScript
containsAnyOf(points: Array<Point3D>): boolean
Swift declaration
func contains(anyOf points: [Point3D]) -> Bool

Returns a Boolean value that indicates whether this volume contains any of the specified points. - Parameter points: An array of points. - Returns A Boolean value that indicates whether `self` contains any of the specified points.

method · iOS 16.0+

distance

TypeScript
distance(other: Rect3D): number
Swift declaration
func distance(to other: Rect3D) -> Double

Returns the distance between the origins of two rectangle.

method · iOS 16.0+

rotation

TypeScript
rotation(other: Rect3D): Rotation3D
Swift declaration
func rotation(to other: Rect3D) -> Rotation3D

Returns the rotation around @p (0,0,0) from the first rectangle to the second rectangle.

method · iOS 16.0+

scaledBy

TypeScript
scaledBy(x?: number, y?: number, z?: number): Rect3D
Swift declaration
func scaledBy(x: Double = 1, y: Double = 1, z: Double = 1) -> Rect3D

Returns the rectangle scaled by the specified values. - Parameter x: The scale factor on the `x` dimension. - Parameter y: The scale factor on the `y` dimension. - Parameter z: The scale factor on the `z` dimension. - Returns The scaled rectangle.

method · iOS 16.0+

formInset

TypeScript
formInset(dXYZ: Size3D): void
Swift declaration
mutating func formInset(by dXYZ: Size3D)

Insets the rectangle by the specified size. - Parameter dXYZ: The inset amount. This function insets the rectangle by the specified values on each axis. The origin value is offset by the distance specified by the `dXYZ` parameter. The size is adjusted by `(2*dXYZ)`, relative to the source rectangle. If the width, height, or depth are positive values, then the rectangle’s size is decreased on that dimension. If width, height, or depth are negative values, the rectangle’s size is increased on that dimension.

init · iOS 26.0+

init

TypeScript
static init(rect: Rect3DFloat): Rect3D
Swift declaration
init(_ rect: Rect3DFloat)

Returns a double-precision rectangle from a single-precision rectangle.

init · iOS 16.0+

init

TypeScript
static init80175(): Rect3D
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All Spatial types →