eulerAngles
TypeScripteulerAngles(order: SDKHandle): EulerAnglesFloatSwift declarationfunc eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesFloatstruct · iOS 26.0+ · SDK 27.1
struct Rotation3DFloateulerAngles(order: SDKHandle): EulerAnglesFloatSwift declarationfunc eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesFloatget inverse(): Rotation3DFloatSwift declarationvar inverse: Rotation3DFloat { get }get isIdentity(): booleanSwift declarationvar isIdentity: Bool { get }static initEulerAngles(eulerAngles: EulerAnglesFloat): Rotation3DFloatSwift declarationinit(eulerAngles: EulerAnglesFloat)swing(twistAxis: RotationAxis3DFloat): Rotation3DFloatSwift declarationfunc swing(twistAxis: RotationAxis3DFloat) -> Rotation3DFloattwist(twistAxis: RotationAxis3DFloat): Rotation3DFloatSwift declarationfunc twist(twistAxis: RotationAxis3DFloat) -> Rotation3DFloatstatic get identity(): Rotation3DFloatSwift declarationstatic let identity: Rotation3DFloatget quaternion(): SDKHandleSwift declarationvar quaternion: simd_quatf { get set }set quaternion(value: SDKHandle)Swift declarationvar quaternion: simd_quatf { get set }get vector(): SDKHandleSwift declarationvar vector: simd_float4 { get set }set vector(value: SDKHandle)Swift declarationvar vector: simd_float4 { get set }static initQuaternion(quaternion: SDKHandle): Rotation3DFloatSwift declarationinit(quaternion: simd_quatf)swingTwist(twistAxis: RotationAxis3DFloat): { "swing": Rotation3DFloat; "twist": Rotation3DFloat }Swift declarationfunc 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 description(): stringSwift declarationvar 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 customMirror(): SDKHandleSwift declarationvar customMirror: Mirror { get }The custom mirror for this instance.
isApproximatelyEqual(other: Rotation3DFloat, tolerance?: number): booleanSwift declarationfunc isApproximatelyEqual(to other: Rotation3DFloat, tolerance: Float = sqrt(.ulpOfOne)) -> BoolReturns 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 axis(): RotationAxis3DFloatSwift declarationvar axis: RotationAxis3DFloat { get set }The axis of the rotation.
set axis(value: RotationAxis3DFloat)Swift declarationvar axis: RotationAxis3DFloat { get set }The axis of the rotation.
static initAngleAxis(angle: Angle2DFloat, axis: RotationAxis3DFloat): Rotation3DFloatSwift declarationinit(angle: Angle2DFloat, axis: RotationAxis3DFloat)get angle(): Angle2DFloatSwift declarationvar angle: Angle2DFloat { get set }The angle of the rotation.
set angle(value: Angle2DFloat)Swift declarationvar angle: Angle2DFloat { get set }The angle of the rotation.
static slerp(from: Rotation3DFloat, to: Rotation3DFloat, t: number, path?: Rotation3D_SlerpPath): Rotation3DFloatSwift declarationstatic func slerp(from: Rotation3DFloat, to: Rotation3DFloat, t: Float, along path: Rotation3D.SlerpPath = .shortest) -> Rotation3DFloatReturns the spherical linear interpolation along the either the shortest or longest arc between two rotations.
static spline(r0: Rotation3DFloat, r1: Rotation3DFloat, r2: Rotation3DFloat, r3: Rotation3DFloat, t: number): Rotation3DFloatSwift declarationstatic func spline(leftEndpoint r0: Rotation3DFloat, from r1: Rotation3DFloat, to r2: Rotation3DFloat, rightEndpoint r3: Rotation3DFloat, t: Float) -> Rotation3DFloatReturns 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.
static initForwardUp(forward: Vector3DFloat, up: Vector3DFloat): Rotation3DFloatSwift declarationinit(forward: Vector3DFloat, up: Vector3DFloat)static initForward(forward: Vector3DFloat): Rotation3DFloatSwift declarationinit(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.
rotatedBy(rotation: Rotation3DFloat): Rotation3DFloatSwift declarationfunc rotated(by rotation: Rotation3DFloat) -> Rotation3DFloatReturns the entity rotated by the specified rotation around the origin. - Parameter rotation: The rotation. - Returns The rotated primitive.
rotatedBy56809(quaternion: SDKHandle): Rotation3DFloatSwift declarationfunc rotated(by quaternion: simd_quatf) -> Rotation3DFloatReturns the entity rotated by the specified quaternion around the origin. - Parameter quaternion: The quaternion that defines the rotation. - Returns The rotated primitive.
applying(transform: ProjectiveTransform3DFloat): Rotation3DFloatSwift declarationfunc applying(_ transform: ProjectiveTransform3DFloat) -> Rotation3DFloatReturns 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.
static initPositionTargetUp(position: Point3DFloat, target: Point3DFloat, up?: Vector3DFloat): Rotation3DFloatSwift declarationinit(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.
static init(): Rotation3DFloatSwift declarationinit()static init76276(rotation: Rotation3D): Rotation3DFloatSwift declarationinit(_ rotation: Rotation3D)Returns a single-precision rotation from a double-precision rotation.
static init31072(quaternion: SDKHandle): Rotation3DFloatSwift declarationinit(_ 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.
static init1738(quaternion: SDKHandle): Rotation3DFloatSwift declarationinit(_ quaternion: simd_quatf)static init38047(source: SDKHandle): Rotation3DFloatSwift declarationinit(_ source: simd_packed_float4)Creates a Spatial rotation from a simd packed vector.
static init76481(): Rotation3DFloatSwift declarationinit()No declarations were skipped in this snapshot.