eulerAngles
TypeScripteulerAngles(order: SDKHandle): EulerAnglesSwift declarationfunc eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesstruct · iOS 16.0+ · SDK 27.1
struct Rotation3DeulerAngles(order: SDKHandle): EulerAnglesSwift declarationfunc eulerAngles(order: __SPEulerAngleOrder) -> EulerAnglesget inverse(): Rotation3DSwift declarationvar inverse: Rotation3D { get }get isIdentity(): booleanSwift declarationvar isIdentity: Bool { get }get isZero(): booleanSwift declarationvar isZero: Bool { get }static initAngleAxis(angle: Angle2D, axis: RotationAxis3D): Rotation3DSwift declarationinit(angle: Angle2D, axis: RotationAxis3D)static initForwardUp(forward: Vector3D, up: Vector3D): Rotation3DSwift declarationinit(forward: Vector3D, up: Vector3D)static initEulerAngles(eulerAngles: EulerAngles): Rotation3DSwift declarationinit(eulerAngles: EulerAngles)swing(twistAxis: RotationAxis3D): Rotation3DSwift declarationfunc swing(twistAxis: RotationAxis3D) -> Rotation3Dtwist(twistAxis: RotationAxis3D): Rotation3DSwift declarationfunc twist(twistAxis: RotationAxis3D) -> Rotation3Dstatic get identity(): Rotation3DSwift declarationstatic let identity: Rotation3Dstatic get zero(): Rotation3DSwift declarationstatic let zero: Rotation3Dget quaternion(): SDKHandleSwift declarationvar quaternion: simd_quatd { get set }set quaternion(value: SDKHandle)Swift declarationvar quaternion: simd_quatd { get set }get vector(): SDKHandleSwift declarationvar vector: simd_double4 { get set }set vector(value: SDKHandle)Swift declarationvar vector: simd_double4 { get set }static initQuaternion(quaternion: SDKHandle): Rotation3DSwift declarationinit(quaternion: simd_quatd)static initQuaternion76540(quaternion: SDKHandle): Rotation3DSwift declarationinit(quaternion: simd_quatd)static initQuaternion70374(quaternion: SDKHandle): Rotation3DSwift declarationinit(quaternion: simd_quatf)swingTwist(twistAxis: RotationAxis3D): { "swing": Rotation3D; "twist": Rotation3D }Swift declarationfunc swingTwist(twistAxis: RotationAxis3D) -> (swing: Rotation3D, twist: Rotation3D)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: Rotation3D, tolerance?: number): booleanSwift declarationfunc isApproximatelyEqual(to other: Rotation3D, tolerance: Double = 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.
static initEyeTargetUp(eye: Point3D, target: Point3D, up?: Vector3D): Rotation3DSwift declarationinit(eye: Point3D, target: Point3D, up: Vector3D = Vector3D(x: 0, y: 1, z: 0))static initAxisAngle(axis: RotationAxis3D, angle: Angle2D): Rotation3DSwift declarationinit(axis: RotationAxis3D, angle: Angle2D)get axis(): RotationAxis3DSwift declarationvar axis: RotationAxis3D { get set }The axis of the rotation.
set axis(value: RotationAxis3D)Swift declarationvar axis: RotationAxis3D { get set }The axis of the rotation.
get angle(): Angle2DSwift declarationvar angle: Angle2D { get set }The angle of the rotation.
set angle(value: Angle2D)Swift declarationvar angle: Angle2D { get set }The angle of the rotation.
static slerp(from: Rotation3D, to: Rotation3D, t: number, path?: Rotation3D_SlerpPath): Rotation3DSwift declarationstatic func slerp(from: Rotation3D, to: Rotation3D, t: Double, along path: Rotation3D.SlerpPath = .shortest) -> Rotation3DReturns the spherical linear interpolation along the either the shortest or longest arc between two rotations.
static spline(r0: Rotation3D, r1: Rotation3D, r2: Rotation3D, r3: Rotation3D, t: number): Rotation3DSwift declarationstatic func spline(leftEndpoint r0: Rotation3D, from r1: Rotation3D, to r2: Rotation3D, rightEndpoint r3: Rotation3D, t: Double) -> Rotation3DReturns 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 initForward(forward: Vector3D): Rotation3DSwift declarationinit(forward: Vector3D)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: Rotation3D): Rotation3DSwift declarationfunc rotated(by rotation: Rotation3D) -> Rotation3DReturns the entity rotated by the specified rotation around the origin. - Parameter rotation: The rotation. - Returns The rotated primitive.
rotatedBy67528(quaternion: SDKHandle): Rotation3DSwift declarationfunc rotated(by quaternion: simd_quatd) -> Rotation3DReturns the entity rotated by the specified quaternion around the origin. - Parameter quaternion: The quaternion that defines the rotation. - Returns The rotated primitive.
applying(transform: ProjectiveTransform3D): Rotation3DSwift declarationfunc applying(_ transform: ProjectiveTransform3D) -> Rotation3DReturns 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: Point3D, target: Point3D, up?: Vector3D): Rotation3DSwift declarationinit(position: Point3D = Point3D(x: 0, y: 0, z: 0), target: Point3D, up: Vector3D = Vector3D(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(): Rotation3DSwift declaration@backDeployed(before: macOS 14.0, iOS 17.0, tvOS 17.0, watchOS 10.0)
init()static init50532(rotation: Rotation3DFloat): Rotation3DSwift declarationinit(_ rotation: Rotation3DFloat)Returns a double-precision rotation from a single-precision rotation.
static init42427(quaternion: SDKHandle): Rotation3DSwift declarationinit(_ quaternion: simd_quatd)static init98869(quaternion: SDKHandle): Rotation3DSwift declarationinit(_ quaternion: simd_quatf)Returns a new rotation from a single-precision quaternion. - note: This function is provided as a convenience. All Spatial storage and calculations are double-precision.
static init15708(source: SDKHandle): Rotation3DSwift declarationinit(_ source: simd_packed_double4)Creates a Spatial rotation from a simd packed vector.
static init61098(): Rotation3DSwift declarationinit()No declarations were skipped in this snapshot.