One Logo Pool Ball
Spatial · IOS API REFERENCE

Rotation3DFloat

struct · iOS 26.0+ · SDK 27.1

struct Rotation3DFloat

Members (35)

method · iOS 26.0+

eulerAngles

TypeScript
eulerAngles(order: SDKHandle): EulerAnglesFloat
Swift declaration
func eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesFloat
get · iOS 26.0+

inverse

TypeScript
get inverse(): Rotation3DFloat
Swift declaration
var inverse: Rotation3DFloat { get }
get · iOS 26.0+

isIdentity

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

init

TypeScript
static initEulerAngles(eulerAngles: EulerAnglesFloat): Rotation3DFloat
Swift declaration
init(eulerAngles: EulerAnglesFloat)
method · iOS 26.0+

swing

TypeScript
swing(twistAxis: RotationAxis3DFloat): Rotation3DFloat
Swift declaration
func swing(twistAxis: RotationAxis3DFloat) -> Rotation3DFloat
method · iOS 26.0+

twist

TypeScript
twist(twistAxis: RotationAxis3DFloat): Rotation3DFloat
Swift declaration
func twist(twistAxis: RotationAxis3DFloat) -> Rotation3DFloat
get

identity

TypeScript
static get identity(): Rotation3DFloat
Swift declaration
static let identity: Rotation3DFloat
get · iOS 26.0+

quaternion

TypeScript
get quaternion(): SDKHandle
Swift declaration
var quaternion: simd_quatf { get set }
set · iOS 26.0+

quaternion

TypeScript
set quaternion(value: SDKHandle)
Swift declaration
var quaternion: simd_quatf { get set }
get · iOS 26.0+

vector

TypeScript
get vector(): SDKHandle
Swift declaration
var vector: simd_float4 { get set }
set · iOS 26.0+

vector

TypeScript
set vector(value: SDKHandle)
Swift declaration
var vector: simd_float4 { get set }
init · iOS 26.0+

init

TypeScript
static initQuaternion(quaternion: SDKHandle): Rotation3DFloat
Swift declaration
init(quaternion: simd_quatf)
method · iOS 26.0+

swingTwist

TypeScript
swingTwist(twistAxis: RotationAxis3DFloat): { "swing": Rotation3DFloat; "twist": Rotation3DFloat }
Swift declaration
func swingTwist(twistAxis: RotationAxis3DFloat) -> (swing: Rotation3DFloat, twist: Rotation3DFloat)

Returns the rotation's swing-twist decomposition for a given twist axis. - Parameter twistAxis The twist axis. - Returns: A tuple that contains the swing rotation and the twist rotation.

get · iOS 26.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 26.0+

customMirror

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

The custom mirror for this instance.

method · iOS 26.0+

isApproximatelyEqual

TypeScript
isApproximatelyEqual(other: Rotation3DFloat, tolerance?: number): boolean
Swift declaration
func isApproximatelyEqual(to other: Rotation3DFloat, tolerance: Float = sqrt(.ulpOfOne)) -> Bool

Returns a Boolean value that indicates whether two rotations are equal within a specified tolerance. - Parameter other: The second rotation. - Parameter tolerance: The tolerance of the comparison.

get · iOS 26.0+

axis

TypeScript
get axis(): RotationAxis3DFloat
Swift declaration
var axis: RotationAxis3DFloat { get set }

The axis of the rotation.

set · iOS 26.0+

axis

TypeScript
set axis(value: RotationAxis3DFloat)
Swift declaration
var axis: RotationAxis3DFloat { get set }

The axis of the rotation.

init · iOS 26.0+

init

TypeScript
static initAngleAxis(angle: Angle2DFloat, axis: RotationAxis3DFloat): Rotation3DFloat
Swift declaration
init(angle: Angle2DFloat, axis: RotationAxis3DFloat)
get · iOS 26.0+

angle

TypeScript
get angle(): Angle2DFloat
Swift declaration
var angle: Angle2DFloat { get set }

The angle of the rotation.

set · iOS 26.0+

angle

TypeScript
set angle(value: Angle2DFloat)
Swift declaration
var angle: Angle2DFloat { get set }

The angle of the rotation.

static · iOS 26.0+

slerp

TypeScript
static slerp(from: Rotation3DFloat, to: Rotation3DFloat, t: number, path?: Rotation3D_SlerpPath): Rotation3DFloat
Swift declaration
static func slerp(from: Rotation3DFloat, to: Rotation3DFloat, t: Float, along path: Rotation3D.SlerpPath = .shortest) -> Rotation3DFloat

Returns the spherical linear interpolation along the either the shortest or longest arc between two rotations.

static · iOS 26.0+

spline

TypeScript
static spline(r0: Rotation3DFloat, r1: Rotation3DFloat, r2: Rotation3DFloat, r3: Rotation3DFloat, t: number): Rotation3DFloat
Swift declaration
static func spline(leftEndpoint r0: Rotation3DFloat, from r1: Rotation3DFloat, to r2: Rotation3DFloat, rightEndpoint r3: Rotation3DFloat, t: Float) -> Rotation3DFloat

Returns an interpolated value between two rotations along a spherical cubic spline. - Parameter leftEndpoint: The left endpoint of the previous interval. - Parameter from: The starting rotation. - Parameter to: The ending rotation. - Parameter rightEndpoint: The right endpoint of the previous interval. Use this function to smoothly interpolate between a sequence of rotations. - returns: A new rotation that's the interpolated value between the two rotations along a spherical cubic spline.

init · iOS 26.0+

init

TypeScript
static initForwardUp(forward: Vector3DFloat, up: Vector3DFloat): Rotation3DFloat
Swift declaration
init(forward: Vector3DFloat, up: Vector3DFloat)
init · iOS 26.0+

init

TypeScript
static initForward(forward: Vector3DFloat): Rotation3DFloat
Swift declaration
init(forward: Vector3DFloat)

Returns a rotation with the specified forward vector. - Parameter forward The forward direction. - note: This function creates a rotation with an up vector that's `Vector3D(x: 0, y: 1, z: 0)` and where `+z` is forward.

method · iOS 26.0+

rotated

TypeScript
rotatedBy(rotation: Rotation3DFloat): Rotation3DFloat
Swift declaration
func rotated(by rotation: Rotation3DFloat) -> Rotation3DFloat

Returns the entity rotated by the specified rotation around the origin. - Parameter rotation: The rotation. - Returns The rotated primitive.

method · iOS 26.0+

rotated

TypeScript
rotatedBy56809(quaternion: SDKHandle): Rotation3DFloat
Swift declaration
func rotated(by quaternion: simd_quatf) -> Rotation3DFloat

Returns the entity rotated by the specified quaternion around the origin. - Parameter quaternion: The quaternion that defines the rotation. - Returns The rotated primitive.

method · iOS 27.0+

applying

TypeScript
applying(transform: ProjectiveTransform3DFloat): Rotation3DFloat
Swift declaration
func applying(_ transform: ProjectiveTransform3DFloat) -> Rotation3DFloat

Returns a rotation that's transformed by the specified projective transform. - Parameter transform: The projective transform. - Returns The transformed rotation. In the case where Spatial is unable to successfully apply the transform, the function returns `.identity`. This function applies the transform to the rotation.

init · iOS 26.0+

init

TypeScript
static initPositionTargetUp(position: Point3DFloat, target: Point3DFloat, up?: Vector3DFloat): Rotation3DFloat
Swift declaration
init(position: Point3DFloat = Point3DFloat(x: 0, y: 0, z: 0), target: Point3DFloat, up: Vector3DFloat = Vector3DFloat(x: 0, y: 1, z: 0))

Returns a rotation that's the look at direction from the eye position to the target. - Parameter position: The eye position. - Parameter target: The point that the rotation looks at. - Parameter up: The up direction. - note: This function creates a rotation where `+z` is forward.

init · iOS 26.0+

init

TypeScript
static init(): Rotation3DFloat
Swift declaration
init()
init · iOS 26.0+

init

TypeScript
static init76276(rotation: Rotation3D): Rotation3DFloat
Swift declaration
init(_ rotation: Rotation3D)

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

init · iOS 26.0+

init

TypeScript
static init31072(quaternion: SDKHandle): Rotation3DFloat
Swift declaration
init(_ quaternion: simd_quatd)

Returns a new rotation from a double-precision quaternion. - note: This function is provided as a convenience. All Spatial storage and calculations are single-precision.

init · iOS 26.0+

init

TypeScript
static init1738(quaternion: SDKHandle): Rotation3DFloat
Swift declaration
init(_ quaternion: simd_quatf)
init · iOS 26.0+

init

TypeScript
static init38047(source: SDKHandle): Rotation3DFloat
Swift declaration
init(_ source: simd_packed_float4)

Creates a Spatial rotation from a simd packed vector.

init · iOS 26.0+

init

TypeScript
static init76481(): Rotation3DFloat
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All Spatial types →