<!--
{
  "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/RotationAxis3D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@UA@SPRotationAxis3D"
  },
  "title" : "RotationAxis3D"
}
-->

# RotationAxis3D

A 3D rotation axis.

```
struct RotationAxis3D
```

## Topics

### Creating a 3D rotation axis structure

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

Creates a rotation axis.

[`init(simd_float3)`](/documentation/Spatial/RotationAxis3D/init(_:)-96si4)

Creates a rotation axis from the specified single-precision vector.

[`init(simd_double3)`](/documentation/Spatial/RotationAxis3D/init(_:)-804sx)

Creates a rotation axis from the specified double-precision vector.

[`init(vector: simd_double3)`](/documentation/Spatial/RotationAxis3D/init(vector:))

Creates a rotation axis from a three-element double-precision vector.

[`init(Vector3D)`](/documentation/Spatial/RotationAxis3D/init(_:)-2zdal)

Creates a rotation axis from a Spatial vector.

[`init(x: Double, y: Double, z: Double)`](/documentation/Spatial/RotationAxis3D/init(x:y:z:)-3z5nm)

Creates a rotation axis from the specified double-precision values.

[`init<T>(x: T, y: T, z: T)`](/documentation/Spatial/RotationAxis3D/init(x:y:z:)-1x93q)

Creates a rotation axis from the specified floating-point values.

[`static SPRotationAxis3D SPRotationAxis3DMakeWithVector(simd_double3 xyz);`](/documentation/Spatial/SPRotationAxis3DMakeWithVector-1n9ib)

Creates a rotation axis from the specified double-precision vector.

### Checking characteristics

[`var x: Double`](/documentation/Spatial/RotationAxis3D/x-swift.property)

The x-coordinate value.

[`var y: Double`](/documentation/Spatial/RotationAxis3D/y-swift.property)

The y-coordinate value.

[`var z: Double`](/documentation/Spatial/RotationAxis3D/z-swift.property)

The z-coordinate value.

[`double x;`](/documentation/Spatial/SPRotationAxis3D/x)

The x-axis value.

[`double y;`](/documentation/Spatial/SPRotationAxis3D/y)

The y-axis value.

[`double z;`](/documentation/Spatial/SPRotationAxis3D/z)

The z-axis value.

[`var vector: simd_double3`](/documentation/Spatial/RotationAxis3D/vector)

A simd three-element vector that contains the x-, y-, and z-coordinate values.

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

A Boolean value that indicates whether the rotation axis is zero.

### Constants

[`static let x: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/x-swift.type.property)

The x-axis, expressed in unit coordinates.

[`static let y: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/y-swift.type.property)

The y-axis, expressed in unit coordinates.

[`static let z: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/z-swift.type.property)

The z-axis, expressed in unit coordinates.

[`static let xy: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/xy)

The xy-axis, expressed in unit coordinates.

[`static let yz: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/yz)

The yz-axis, expressed in unit coordinates.

[`static let xz: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/xz)

The xz-axis, expressed in unit coordinates.

[`static let xyz: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/xyz)

The xyz-axis, expressed in unit coordinates.

[`static let zero: RotationAxis3D`](/documentation/Spatial/RotationAxis3D/zero)

The rotation axis with the zero value.

### Deprecated symbols

[`var simd: simd_double3`](/documentation/Spatial/RotationAxis3D/simd)

A simd three-element vector that contains the x-, y-, and z-coordinate values.

[`static bool SPRotationAxis3DEqualToRotationAxis(SPRotationAxis3D axis1, SPRotationAxis3D axis2);`](/documentation/Spatial/SPRotationAxis3DEqualToRotationAxis)

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

### Initializers

[`init(simd_packed_double4)`](/documentation/Spatial/RotationAxis3D/init(_:)-ctks)

Creates a Spatial rotation axis from a simd packed vector.

[`init(RotationAxis3DFloat)`](/documentation/Spatial/RotationAxis3D/init(_:)-lvvq)

Returns a double-precision rotation axis from a single-precision rotation axis.

### Default Implementations

[CustomReflectable Implementations](/documentation/Spatial/RotationAxis3D/CustomReflectable-Implementations)

[Decodable Implementations](/documentation/Spatial/RotationAxis3D/Decodable-Implementations)

[Encodable Implementations](/documentation/Spatial/RotationAxis3D/Encodable-Implementations)

[Equatable Implementations](/documentation/Spatial/RotationAxis3D/Equatable-Implementations)

[Hashable Implementations](/documentation/Spatial/RotationAxis3D/Hashable-Implementations)

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

---

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)