<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/Primitive3D",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "s:7Spatial11Primitive3DP"
  },
  "title" : "Primitive3D"
}
-->

# Primitive3D

A set of methods common to Spatial primitives.

```
protocol Primitive3D : Decodable, Encodable, Equatable
```

## Topics

### Instance properties

[`var isFinite: Bool`](/documentation/Spatial/Primitive3D/isFinite)

Returns a Boolean value that indicates whether the primitive is infinite.

[`var isNaN: Bool`](/documentation/Spatial/Primitive3D/isNaN)

Returns a Boolean value that indicates whether the primitive contains any NaN values.

[`var isZero: Bool`](/documentation/Spatial/Primitive3D/isZero)

Returns a Boolean value that indicates whether the primitive is zero.

### Type properties

[`static var infinity: Self`](/documentation/Spatial/Primitive3D/infinity)

A primitive with infinite values.

[`static var zero: Self`](/documentation/Spatial/Primitive3D/zero)

A primitive with zero values.

### Transforming primitives

[`func apply(AffineTransform3D)`](/documentation/Spatial/Primitive3D/apply(_:)-1nv9y)

Applies an affine transform.

[`func apply(ProjectiveTransform3D)`](/documentation/Spatial/Primitive3D/apply(_:)-64cgp)

Applies a projective transform.

[`func applying(AffineTransform3D) -> Self`](/documentation/Spatial/Primitive3D/applying(_:)-6264n)

Returns the entity that results from applying an affine transform.

[`func applying(ProjectiveTransform3D) -> Self`](/documentation/Spatial/Primitive3D/applying(_:)-6icvg)

Returns the entity that results from applying a projective transform.

[`func apply(Pose3D)`](/documentation/Spatial/Primitive3D/apply(_:)-4ic73)

Applies a pose.

[`func applying(Pose3D) -> Self`](/documentation/Spatial/Primitive3D/applying(_:)-5yia)

Returns the entity that results from applying a pose.

[`func unapply(AffineTransform3D)`](/documentation/Spatial/Primitive3D/unapply(_:)-4z6og)

Unapplies an affine transform.

[`func unapply(ProjectiveTransform3D)`](/documentation/Spatial/Primitive3D/unapply(_:)-5haxp)

Unapplies a projective transform.

[`func unapplying(AffineTransform3D) -> Self`](/documentation/Spatial/Primitive3D/unapplying(_:)-8ihh5)

Returns the entity that results from unapplying an affine transform.

[`func unapplying(ProjectiveTransform3D) -> Self`](/documentation/Spatial/Primitive3D/unapplying(_:)-5ppqi)

Returns the entity that results from unapplying a projective transform.

[`func unapply(Pose3D)`](/documentation/Spatial/Primitive3D/unapply(_:)-2992s)

Unapplies a pose.

[`func unapplying(Pose3D) -> Self`](/documentation/Spatial/Primitive3D/unapplying(_:)-37fbg)

Returns the entity that results from unapplying a pose.

## Relationships

### Conforming Types

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

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

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

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

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

### Inherits From

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

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

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

---

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)