What's New / Spatial, 3D & RealityKit

What's new in Spatial

+5 NewiOS · macOS · tvOS · watchOS

Spatial is Apple's geometry library for 3D math. It provides value types for points, vectors, sizes, rotations, and poses, where a pose combines position and orientation.

The 27 SDK adds 5 APIs and removes or deprecates nothing. The new types are Rotation3D and Pose3D, their single-precision variants Rotation3DFloat and Pose3DFloat, and SIMD3. The Float-suffixed rotation and pose types parallel the existing double-precision ones and use 32-bit storage.

New

5
extension

Pose3D

NewiOSmacOStvOSwatchOS
extension Pose3D : ProjectiveTransformable3D
Declaration
extension Pose3D : ProjectiveTransformable3D {

    /// Returns a pose that's transformed by the specified projective transform.
    ///
    /// - Parameter transform: The projective transform.
    /// - Returns The transformed pose.
    ///
    /// This function applies the transform to the pose.
    public func applying(_ transform: ProjectiveTransform3D) -> Pose3D
}
extension

Pose3DFloat

NewiOSmacOStvOSwatchOS
extension Pose3DFloat : ProjectiveTransformable3DFloat
Declaration
extension Pose3DFloat : ProjectiveTransformable3DFloat {

    /// Returns a pose that's transformed by the specified projective transform.
    ///
    /// - Parameter transform: The projective transform.
    /// - Returns The transformed pose.
    ///
    /// This function applies the transform to the pose.
    public func applying(_ transform: ProjectiveTransform3DFloat) -> Pose3DFloat
}
extension

Rotation3D

NewiOSmacOStvOSwatchOS
extension Rotation3D : ProjectiveTransformable3D
Declaration
extension Rotation3D : ProjectiveTransformable3D {

    /// 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.
    public func applying(_ transform: ProjectiveTransform3D) -> Rotation3D
}
extension

Rotation3DFloat

NewiOSmacOStvOSwatchOS
extension Rotation3DFloat : ProjectiveTransformable3DFloat
Declaration
extension Rotation3DFloat : ProjectiveTransformable3DFloat {

    /// 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.
    public func applying(_ transform: ProjectiveTransform3DFloat) -> Rotation3DFloat
}
extension

SIMD3

NewiOSmacOStvOSwatchOS
extension SIMD3 : ProjectiveTransformable3D, ProjectiveTransformable3DFloat where Scalar == Float
Declaration
extension SIMD3 : ProjectiveTransformable3D, ProjectiveTransformable3DFloat where Scalar == Float {

    /// Returns a simd vector that's transformed by the specified projective transform.
    ///
    /// - Parameter transform: The projective transform.
    /// - Returns The transformed ray.
    ///
    /// This function applies the transform to the simd vector.
    public func applying(_ transform: ProjectiveTransform3DFloat) -> simd_float3
}

No APIs match your filter.

← More in Spatial, 3D & RealityKit