TechnologiesAR & Spatial

Spatial

iOSmacOStvOSwatchOSvisionOS

Spatial provides 3D math primitives for spatial computing across iOS, macOS, tvOS, watchOS, and visionOS. Use value types such as Point3D, Vector3D, Size3D, and Rect3D to describe positions and extents, Rotation3D, EulerAngles, RotationAxis3D, and Angle2D to express orientation, and Ray3D, Pose3D, and ScaledPose3D to model directed geometry and placement. For transforming geometry between coordinate spaces, apply AffineTransform3D and ProjectiveTransform3D, and convert between Cartesian and SphericalCoordinates3D representations. Most types are available in both double-precision and single-precision Float variants.

Points and Vectors 4

Value types that describe positions and directions in a 3D coordinate space.

  • St
    Point3DiOS 16.0+
    A structure that contains a point in a three-dimensional coordinate system.
  • St
    Point3DFloatiOS 26.0+
    A single-precision structure that contains a point in a three-dimensional coordinate system.
  • St
    Vector3DiOS 16.0+
    A structure that defines a three-element vector
  • St
    Vector3DFloatiOS 26.0+
    A single-precision structure that defines a three-element vector

Sizes and Rectangles 5

Value types that describe extents and axis-aligned regions in three dimensions.

  • St
    Size3DiOS 16.0+
    A structure that contains width, height, and depth values.
  • St
    Size3DFloatiOS 26.0+
    A single-precision structure that contains width, height, and depth values.
  • St
    Rect3DiOS 16.0+
    A structure that contains the location and dimensions of a 3D rectangle.
  • St
    Rect3DFloatiOS 26.0+
    A single-precision structure that contains the location and dimensions of a 3D rectangle.
  • St
    Dimension3DSetiOS 16.0+
    A structure that groups the dimensions of a spatial value along the three coordinate axes.

Rotations and Orientation 9

Types that express orientation using angles, axes, and rotation representations.

  • St
    Rotation3DiOS 16.0+
    A structure that represents a rotation in three dimensions.
  • St
    Rotation3DFloatiOS 26.0+
    A single-precision structure that represents a rotation in three dimensions.
  • St
    EulerAnglesiOS 16.0+
    @abstract A structure that represents Euler angles, in radians, and ordering.
  • St
    EulerAnglesFloatiOS 26.0+
    @abstract A structure that represents Euler angles, in radians, and ordering.
  • St
    RotationAxis3DiOS 16.0+
    A 3D axis.
  • St
    RotationAxis3DFloatiOS 26.0+
    A 3D axis.
  • St
    Angle2DiOS 16.0+
    A geometric angle whose value you access in either radians or degrees.
  • St
    Angle2DFloatiOS 26.0+
    A single-precision geometric angle whose value you access in either radians or degrees.
  • St
    __SPEulerAngleOrderiOS 16.0+
    @abstract Constants that specify the Euler angle order.

Rays, Poses, and Placement 6

Types that model directed geometry and the position, orientation, and scale of placed content.

  • St
    Ray3DiOS 16.0+
    A structure that contains the origin and direction of a 3D ray.
  • St
    Ray3DFloatiOS 26.0+
    A single-precision structure that contains the origin and direction of a 3D ray.
  • St
    Pose3DiOS 16.0+
    A structure that contains a position and rotation.
  • St
    Pose3DFloatiOS 26.0+
    A single-precision structure that contains a position and rotation.
  • St
    ScaledPose3D
    A structure that contains a position, rotation, and scale.
  • St
    ScaledPose3DFloat
    A structure that contains a position, rotation, and scale.

Transforms 4

Affine and projective transforms for converting geometry between coordinate spaces.

  • St
    AffineTransform3DiOS 16.0+
    @abstract A 3D affine transformation matrix.
  • St
    AffineTransform3DFloatiOS 26.0+
    @abstract A single-precision 3D affine transformation matrix.
  • St
    ProjectiveTransform3DiOS 16.0+
    A 3D projective transformation matrix.
  • St
    ProjectiveTransform3DFloatiOS 26.0+
    A single-precision 3D projective transformation matrix.

Coordinate Representations 6

Types and axis descriptors for converting between and reasoning about coordinate systems.

  • St
    SphericalCoordinates3DiOS 18.0+
    A structure that defines spherical coordinates in radial, inclination, azimuthal order.
  • St
    SphericalCoordinates3DFloatiOS 26.0+
    A single-precision structure that defines spherical coordinates in radial, inclination, azimuthal order.
  • St
    Axis3D
    Enumerations that describe an axis.
  • En
    AxisWithFactorsiOS 16.0+
    The axis of a shear transform.
  • En
    AxisWithFactorsFloatiOS 26.0+
    The axis of a shear transform.
  • St
    WorldReferenceCoordinateSpaceiOS 26.0+
    A coordinate space that represents a world reference point.

Coordinate Space Protocols 4

Protocols that describe coordinate spaces and the values defined within them.

  • Pr
    CoordinateSpace3DiOS 26.0+
    A type that represents a coordinate space which you can use to convert
  • Pr
    CoordinateSpace3DFloatiOS 26.0+
    A protocol that describes a single-precision 3D coordinate space.
  • Pr
    CoordinateSpaceValue3DiOS 26.0+
    An opaque value which can be resolved to a concrete value
  • Pr
    SpatialTypeProtocoliOS 26.0+
    A protocol that defines the common behavior of Spatial's value types.

Geometric Primitive Protocols 5

Protocols that unify the framework's geometric primitive and volumetric value types.

  • Pr
    Primitive3DiOS 16.0+
    A set of methods common to Spatial primitives.
  • Pr
    Primitive3DProtocoliOS 26.0+
    A set of methods common to Spatial primitives.
  • Pr
    VolumetriciOS 16.0+
    A set of methods for working with Spatial primitives with volume.
  • Pr
    VolumetricProtocoliOS 26.0+
    A set of methods for working with Spatial primitives with volume.
  • Pr
    ClampableWithinRectProtocoliOS 26.0+
    A set of methods that defines the interface for Spatial entities that can be clamped to a volume.

Transformation Protocols 11

Protocols that define the operations a type supports for transforming spatial geometry.

  • Pr
    Transform3DProtocoliOS 26.0+
    A set of methods that are common to transforms.
  • Pr
    ProjectiveTransformable3DiOS 26.0+
    A protocol for double-precision types that can be transformed by a projective transform.
  • Pr
    ProjectiveTransformable3DFloatiOS 26.0+
    A protocol for single-precision types that can be transformed by a projective transform.
  • Pr
    Rotatable3DiOS 16.0+
    A set of methods that defines the interface for Spatial entities that can rotate.
  • Pr
    Rotatable3DProtocoliOS 26.0+
    A set of methods that defines the interface for Spatial entities that can rotate.
  • Pr
    Scalable3DiOS 16.0+
    A set of methods that defines the interface for Spatial entities that can scale.
  • Pr
    Scalable3DProtocoliOS 26.0+
    A set of methods that defines the interface for Spatial entities that can scale.
  • Pr
    Shearable3DiOS 16.0+
    A set of methods that defines the interface for Spatial entities that can shear.
  • Pr
    Shearable3DProtocoliOS 26.0+
    A set of methods that defines the interface for Spatial entities that can shear.
  • Pr
    Translatable3DiOS 16.0+
    A set of methods that defines the interface for Spatial entities that can translate.
  • Pr
    Translatable3DProtocoliOS 26.0+
    A set of methods that defines the interface for Spatial entities that can translate.

Extends 9

SIMD3simd_quatfsimd_float4x3simd_float4x4SIMD4simd_quatdsimd_double4x3simd_double4x4Never
← AR & Spatial