<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Size3D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@UA@SPSize3D"
  },
  "title" : "Size3D"
}
-->

# Size3D

A size that describes width, height, and depth in a 3D coordinate system.

```
struct Size3D
```

## Topics

### Creating a 3D size structure

[`init()`](/documentation/Spatial/Size3D/init())

Creates a size structure.

[`init(width:height:depth:)`](/documentation/Spatial/Size3D/init(width:height:depth:)-4j9bk)

Creates a size structure from the specified double-precision values.

[`init(width:height:depth:)`](/documentation/Spatial/Size3D/init(width:height:depth:)-4kscw)

Creates a size structure from the specified floating-point values.

[`init(_:)`](/documentation/Spatial/Size3D/init(_:)-2ibhr)

Creates a size structure from the specified single-precision vector.

[`init(_:)`](/documentation/Spatial/Size3D/init(_:)-3y7nr)

Creates a size structure from the specified double-precision vector.

[`init(vector:)`](/documentation/Spatial/Size3D/init(vector:))

Creates a size structure from the specified double-precision vector.

[`init(_:)`](/documentation/Spatial/Size3D/init(_:)-7kyp0)

Creates a size structure from the specified Spatial point.

[`init(_:)`](/documentation/Spatial/Size3D/init(_:)-6nss1)

Creates a size structure from the specified Spatial vector.

[`SPSize3DMakeWithPoint`](/documentation/Spatial/SPSize3DMakeWithPoint)

Creates a size structure from the specified Spatial point.

[`SPSize3DMakeWithVector`](/documentation/Spatial/SPSize3DMakeWithVector-5cgfq)

Creates a size structure from the specified double-precision vector.

[`SPSize3DMakeWithVector`](/documentation/Spatial/SPSize3DMakeWithVector-6ar1t)

### Inspecting a 3D size’s properties

[`width`](/documentation/Spatial/Size3D/width)

The width value.

[`height`](/documentation/Spatial/Size3D/height)

The height value.

[`depth`](/documentation/Spatial/Size3D/depth)

The depth value.

[`width`](/documentation/Spatial/SPSize3D/width)

The width value.

[`height`](/documentation/Spatial/SPSize3D/height)

The height value.

[`depth`](/documentation/Spatial/SPSize3D/depth)

The depth value.

[`size`](/documentation/Spatial/Size3D/size)

The size value.

[`vector`](/documentation/Spatial/Size3D/vector)

[`SPSize3DGetVector`](/documentation/Spatial/SPSize3DGetVector)

A simd three-element vector that contains the width, height, and depth values.

### Transforming a 3D size structure

[`applying(_:)`](/documentation/Spatial/Size3D/applying(_:)-85mlm)

Returns a size that results from applying the specified pose.

[`applying(_:)`](/documentation/Spatial/Size3D/applying(_:)-7e2pf)

Returns a size that’s transformed by the specified scaled pose.

[`applying(_:)`](/documentation/Spatial/Size3D/applying(_:)-85mlm)

Returns a size that results from applying the specified pose.

[`unapplying(_:)`](/documentation/Spatial/Size3D/unapplying(_:)-7qam3)

Returns a size that results from unapplying the specified affine transform.

[`unapplying(_:)`](/documentation/Spatial/Size3D/unapplying(_:)-yock)

Returns a size that results from unapplying the specified projective transform.

[`unapplying(_:)`](/documentation/Spatial/Size3D/unapplying(_:)-3ip2e)

Returns a size that results from unapplying the specified pose.

[`SPSize3DScaleBySize`](/documentation/Spatial/SPSize3DScaleBySize)

Returns a size that results from scaling with the specified size structure.

[`SPSize3DScaleUniform`](/documentation/Spatial/SPSize3DScaleUniform)

Returns a size that results from uniformly scaling with the specified double-precision value.

[`SPSize3DRotate`](/documentation/Spatial/SPSize3DRotate)

Returns a size that results from applying the specified rotation.

[`SPSize3DRotateByQuaternion`](/documentation/Spatial/SPSize3DRotateByQuaternion)

Returns a size that results from rotating with the specified quaternion.

[`sheared(_:)`](/documentation/Spatial/Size3D/sheared(_:))

Returns a size that results from shearing over an axis by shear factors for the other two axes.

[`applying(_:)`](/documentation/Spatial/Size3D/applying(_:)-7e2pf)

Returns a size that’s transformed by the specified scaled pose.

[`unapplying(_:)`](/documentation/Spatial/Size3D/unapplying(_:)-42rsa)

Returns a size that’s transformed by the inverse of the specified scaled pose.

[`SPSize3DApplyPose`](/documentation/Spatial/SPSize3DApplyPose)

Returns a size that results from applying the specified pose.

[`SPSize3DUnapplyPose`](/documentation/Spatial/SPSize3DUnapplyPose)

Returns a size that results from unapplying the specified pose.

[`SPSize3DApplyAffineTransform`](/documentation/Spatial/SPSize3DApplyAffineTransform)

Returns a size that results from applying the specified affine transform.

[`SPSize3DApplyProjectiveTransform`](/documentation/Spatial/SPSize3DApplyProjectiveTransform)

Returns a size that results from applying the specified projective transform.

[`SPSize3DUnapplyAffineTransform`](/documentation/Spatial/SPSize3DUnapplyAffineTransform)

Returns a size that results from unapplying the specified affine transform.

[`SPSize3DUnapplyProjectiveTransform`](/documentation/Spatial/SPSize3DUnapplyProjectiveTransform)

Returns a size that results from unapplying the specified projective transform.

[`SPSize3DScaleBy`](/documentation/Spatial/SPSize3DScaleBy)

Returns a size that results from scaling with the specified double-precision values.

[`SPSize3DShear`](/documentation/Spatial/SPSize3DShear)

Returns a size that results from shearing over an axis by shear factors for the other two axes.

[`SPSize3DApplyScaledPose`](/documentation/Spatial/SPSize3DApplyScaledPose)

Returns a size that’s transformed by the specified scaled pose.

[`SPSize3DUnapplyScaledPose`](/documentation/Spatial/SPSize3DUnapplyScaledPose)

Returns a size that’s transformed by the inverse of the specified scaled pose.

### Checking characteristics

[`contains(anyOf:)`](/documentation/Spatial/Size3D/contains(anyOf:))

Returns a Boolean value that indicates whether the size contains the specified point.

[`SPSize3DContainsAnyPoint`](/documentation/Spatial/SPSize3DContainsAnyPoint)

Returns a Boolean value that indicates whether the size contains the specified point.

[`SPSize3DContainsPoint`](/documentation/Spatial/SPSize3DContainsPoint)

Returns a Boolean value that indicates whether the size contains the specified point.

[`SPSize3DContainsSize`](/documentation/Spatial/SPSize3DContainsSize)

Returns a Boolean value that indicates whether the size contains the specified size.

[`SPSize3DIsValid`](/documentation/Spatial/SPSize3DIsValid)

A Boolean value that indicates whether the size represents a valid value.

[`SPSize3DIsFinite`](/documentation/Spatial/SPSize3DIsFinite)

[`SPSize3DIsNaN`](/documentation/Spatial/SPSize3DIsNaN)

[`SPSize3DIsZero`](/documentation/Spatial/SPSize3DIsZero)

### Creating derived 3D sizes

[`intersection(_:)`](/documentation/Spatial/Size3D/intersection(_:))

Returns the intersection of two sizes.

[`SPSize3DIntersection`](/documentation/Spatial/SPSize3DIntersection)

Returns the intersection of two sizes.

[`SPSize3DUnion`](/documentation/Spatial/SPSize3DUnion)

Returns the smallest size that contains two sizes.

### Comparing values

[`==(_:_:)`](/documentation/Spatial/Size3D/==(_:_:))

Returns a Boolean value that indicates whether two values are equal.

[`SPSize3DEqualToSize`](/documentation/Spatial/SPSize3DEqualToSize)

Returns a Boolean value that indicates whether two values are equal.

### 3D size constants

[`one`](/documentation/Spatial/Size3D/one)

The size structure with width, height, and depth values of one.

[`SPSize3DZero`](/documentation/Spatial/SPSize3DZero)

The size structure with the zero value.

[`SPSize3DInfinity`](/documentation/Spatial/SPSize3DInfinity)

The size structure with infinite width, height, and depth values.

### Applying arithmetic operations

[`*(_:_:)`](/documentation/Spatial/Size3D/*(_:_:)-751dt)

Returns a size that’s the product of a size and a scalar value.

[`*(_:_:)`](/documentation/Spatial/Size3D/*(_:_:)-8zb5j)

Returns a size that’s the product of a scalar value and a size.

[`*(_:_:)`](/documentation/Spatial/Size3D/*(_:_:)-4qpgt)

Returns the size that results from applying the affine transform to the size.

[`*(_:_:)`](/documentation/Spatial/Size3D/*(_:_:)-52miz)

Returns the size that results from applying the projective transform to the size.

[`*(_:_:)`](/documentation/Spatial/Size3D/*(_:_:)-5bb1n)

Returns a new size after applying the pose to the size.

[`+(_:_:)`](/documentation/Spatial/Size3D/+(_:_:))

Returns a size that’s the element-wise sum of two sizes.

[`-(_:)`](/documentation/Spatial/Size3D/-(_:))

Returns a size that’s the element-wise negation of the size.

[`-(_:_:)`](/documentation/Spatial/Size3D/-(_:_:))

Returns a size that’s the element-wise difference of two points.

[`*=(_:_:)`](/documentation/Spatial/Size3D/*=(_:_:))

Multiplies a size and a double-precision value, and stores the result in the left-hand-side variable.

[`+=(_:_:)`](/documentation/Spatial/Size3D/+=(_:_:)-75tn3)

Adds two size structures and stores the result in the left-hand-side variable.

[`+=(_:_:)`](/documentation/Spatial/Size3D/+=(_:_:)-7yrej)

Adds a size and a vector, and stores the result in the left-hand-side variable.

[`-=(_:_:)`](/documentation/Spatial/Size3D/-=(_:_:)-8t5kg)

Subtracts a size from a size and stores the difference in the left-hand-side variable.

[`-=(_:_:)`](/documentation/Spatial/Size3D/-=(_:_:)-3te52)

Subtracts a size from a vector and stores the difference in the left-hand-side variable.

[`/(_:_:)`](/documentation/Spatial/Size3D/_(_:_:))

Returns a size with each element divided by a scalar value.

[`/=(_:_:)`](/documentation/Spatial/Size3D/_=(_:_:))

Divides a size by a scalar vaue and stores the result in the left-hand-side variable.

### Deprecated symbols

[`simd`](/documentation/Spatial/Size3D/simd)

[`containsAny(of:)`](/documentation/Spatial/Size3D/containsAny(of:))

Returns a Boolean value that indicates whether the size contains the specified point.

[`SPSize3DInvalid`](/documentation/Spatial/SPSize3DInvalid)

The null size that represents an invalid value.

## Relationships

### Conforms To

[`Primitive3D`](/documentation/Spatial/Primitive3D)

[`AdditiveArithmetic`](/documentation/Swift/AdditiveArithmetic)

[`Primitive3DProtocol`](/documentation/Spatial/Primitive3DProtocol)

[`Volumetric`](/documentation/Spatial/Volumetric)

[`Rotatable3DProtocol`](/documentation/Spatial/Rotatable3DProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Shearable3D`](/documentation/Spatial/Shearable3D)

[`Sendable`](/documentation/Swift/Sendable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Escapable`](/documentation/Swift/Escapable)

[`VectorArithmetic`](/documentation/SwiftUI/VectorArithmetic)

[`Animatable`](/documentation/SwiftUI/Animatable)

[`SpatialTypeProtocol`](/documentation/Spatial/SpatialTypeProtocol)

[`Scalable3D`](/documentation/Spatial/Scalable3D)

[`Hashable`](/documentation/Swift/Hashable)

[`VolumetricProtocol`](/documentation/Spatial/VolumetricProtocol)

[`Rotatable3D`](/documentation/Spatial/Rotatable3D)

[`Copyable`](/documentation/Swift/Copyable)

[`Decodable`](/documentation/Swift/Decodable)

[`Encodable`](/documentation/Swift/Encodable)

[`Scalable3DProtocol`](/documentation/Spatial/Scalable3DProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)