<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Spatial",
  "identifier" : "/documentation/Spatial/ProjectiveTransform3D",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Spatial"
    ],
    "preciseIdentifier" : "c:@SA@SPProjectiveTransform3D"
  },
  "title" : "ProjectiveTransform3D"
}
-->

# ProjectiveTransform3D

A 3D projective transformation matrix.

```
struct ProjectiveTransform3D
```

## Topics

### Creating a 3D projective transform structure

[`init()`](/documentation/Spatial/ProjectiveTransform3D/init()-1clia)

Creates a projective transform.

[`init()`](/documentation/Spatial/ProjectiveTransform3D/init()-6c4f4)

Returns a new identity projective transform.

[`init(simd_float4x4)`](/documentation/Spatial/ProjectiveTransform3D/init(_:)-7b2bq)

Creates a projective transform from the specified 4 x 4 single-precision matrix.

[`init(simd_double4x4)`](/documentation/Spatial/ProjectiveTransform3D/init(_:)-6g88l)

Creates a projective transform from the specified double-precision matrix.

[`init(matrix: simd_double4x4)`](/documentation/Spatial/ProjectiveTransform3D/init(matrix:)-8eg5x)

Creates a projective transform from the specified 4 x 4 double-precision matrix.

[`init(AffineTransform3D)`](/documentation/Spatial/ProjectiveTransform3D/init(_:)-9t2jh)

Creates a projective transform from the specified affine transform.

[`init(pose: Pose3D)`](/documentation/Spatial/ProjectiveTransform3D/init(pose:))

Creates a projective transform from the specified pose structure.

[`init(scale: Size3D, rotation: Rotation3D, translation: Vector3D)`](/documentation/Spatial/ProjectiveTransform3D/init(scale:rotation:translation:)-4h5wm)

Creates a projective transform from the specified scale, rotate, and translate transforms.

[`init(shear: AxisWithFactors)`](/documentation/Spatial/ProjectiveTransform3D/init(shear:))

Creates a projective transform from the specified shear transform.

[`init(leftTangent: Double, rightTangent: Double, topTangent: Double, bottomTangent: Double, nearZ: Double, farZ: Double, reverseZ: Bool)`](/documentation/Spatial/ProjectiveTransform3D/init(leftTangent:rightTangent:topTangent:bottomTangent:nearZ:farZ:reverseZ:))

Returns a projective transform from tangents for each side of its frustum.

[`init(fovY: Angle2D, aspectRatio: Double, nearZ: Double, farZ: Double)`](/documentation/Spatial/ProjectiveTransform3D/init(fovY:aspectRatio:nearZ:farZ:))

Returns a projective transform with right-hand side perspective.

[`init(fovY: Angle2D, aspectRatio: Double, nearZ: Double, farZ: Double, reverseZ: Bool)`](/documentation/Spatial/ProjectiveTransform3D/init(fovY:aspectRatio:nearZ:farZ:reverseZ:))

[`init(scaledPose: ScaledPose3D)`](/documentation/Spatial/ProjectiveTransform3D/init(scaledPose:))

[`static SPProjectiveTransform3D SPProjectiveTransform3DMake(SPSize3D scale, SPRotation3D rotation, SPSize3D translation);`](/documentation/Spatial/SPProjectiveTransform3DMake-6aldt)

Creates a projective transform from the specified scale, rotate, and translate transforms.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMake(SPSize3D scale, SPRotation3D rotation, SPVector3D translation);`](/documentation/Spatial/SPProjectiveTransform3DMake-83q47)

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeShear(SPAxis shearAxis, double shearFactor0, double shearFactor1);`](/documentation/Spatial/SPProjectiveTransform3DMakeShear)

Creates an affine transform from the specified shear transform.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeWithPose(SPPose3D pose);`](/documentation/Spatial/SPProjectiveTransform3DMakeWithPose)

Creates a projective transform from the specified pose structure.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeWithScaledPose(SPScaledPose3D pose);`](/documentation/Spatial/SPProjectiveTransform3DMakeWithScaledPose)

Returns a new projective transform structure from the specified scaled pose structure.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeWithRHPerspective(double fovyRadians, double aspectRatio, double nearZ, double farZ);`](/documentation/Spatial/SPProjectiveTransform3DMakeWithRHPerspective-97qwp)

Returns a projective transform with right-hand side perspective.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeWithRHPerspective(double fovyRadians, double aspectRatio, double nearZ, double farZ, bool reverseZ);`](/documentation/Spatial/SPProjectiveTransform3DMakeWithRHPerspective-9gl97)

### Inspecting a 3D projective transform’s properties

[`var inverse: ProjectiveTransform3D?`](/documentation/Spatial/ProjectiveTransform3D/inverse)

The projective transform’s inverse.

[`var scaleComponent: Size3D`](/documentation/Spatial/ProjectiveTransform3D/scaleComponent)

The scale component of the projective transform.

[`var translation: Vector3D`](/documentation/Spatial/ProjectiveTransform3D/translation)

The translation component of the projective transform.

[`var matrix: simd_double4x4`](/documentation/Spatial/ProjectiveTransform3D/matrix)

The projective transform’s underlying matrix.

### Transforming a 3D projective transform structure

[`func sheared(AxisWithFactors) -> ProjectiveTransform3D`](/documentation/Spatial/ProjectiveTransform3D/sheared(_:))

Returns a projective transform that results from shearing over an axis by shear factors for the other two axes.

[`enum AxisWithFactors`](/documentation/Spatial/AxisWithFactors)

Constants that describe the axis of a shear transform.

[`static SPProjectiveTransform3D SPProjectiveTransform3DScaleBy(SPProjectiveTransform3D transform, double x, double y, double z);`](/documentation/Spatial/SPProjectiveTransform3DScaleBy)

Returns a transform that results from scaling with the specified double-precision values.

[`static SPProjectiveTransform3D SPProjectiveTransform3DShear(SPProjectiveTransform3D transform, SPAxis shearAxis, double shearFactor0, double shearFactor1);`](/documentation/Spatial/SPProjectiveTransform3DShear)

Returns a projective transform that results from shearing over an axis by shear factors for the other two axes.

[`struct Axis3D`](/documentation/Spatial/Axis3D)

Constants that describe an axis.

[`func flip(along: Axis3D)`](/documentation/Spatial/ProjectiveTransform3D/flip(along:))

Flips a projective transform along the specified axis.

[`func flipped(along: Axis3D) -> ProjectiveTransform3D`](/documentation/Spatial/ProjectiveTransform3D/flipped(along:))

Returns a projective transform that results from flipping it along the specified axis.

[`static SPProjectiveTransform3D SPProjectiveTransform3DFlip(SPProjectiveTransform3D transform, SPAxis flipAxis);`](/documentation/Spatial/SPProjectiveTransform3DFlip)

Returns a projective transform that results from flipping it along the specified axis.

[`static SPProjectiveTransform3D SPProjectiveTransform3DInverted(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DInverted)

Returns a new transform that results from inverting an existing projective transform.

[`static void SPProjectiveTransform3DSetTranslation(SPProjectiveTransform3D *transform, SPVector3D offset);`](/documentation/Spatial/SPProjectiveTransform3DSetTranslation)

Sets the translation of a projective transform.

[`static SPProjectiveTransform3D SPProjectiveTransform3DRotate(SPProjectiveTransform3D transform, SPRotation3D rotation);`](/documentation/Spatial/SPProjectiveTransform3DRotate)

Returns a transform that results from applying the specified rotation.

[`static SPProjectiveTransform3D SPProjectiveTransform3DRotateByQuaternion(SPProjectiveTransform3D transform, simd_quatd quaternion);`](/documentation/Spatial/SPProjectiveTransform3DRotateByQuaternion)

Returns a transform that results from rotating with the specified quaternion.

[`static SPProjectiveTransform3D SPProjectiveTransform3DScaleBySize(SPProjectiveTransform3D transform, SPSize3D scale);`](/documentation/Spatial/SPProjectiveTransform3DScaleBySize)

Returns a transform that results from scaling with the specified size structure.

[`static SPProjectiveTransform3D SPProjectiveTransform3DScaleUniform(SPProjectiveTransform3D transform, double scale);`](/documentation/Spatial/SPProjectiveTransform3DScaleUniform)

Returns a transform that results from uniformly scaling with the specified double-precision value.

[`static SPProjectiveTransform3D SPProjectiveTransform3DTranslate(SPProjectiveTransform3D transform, SPSize3D size);`](/documentation/Spatial/SPProjectiveTransform3DTranslate-4tynj)

Returns a transform with an origin that’s offset by the specified size.

[`static SPProjectiveTransform3D SPProjectiveTransform3DTranslate(SPProjectiveTransform3D transform, SPVector3D offset);`](/documentation/Spatial/SPProjectiveTransform3DTranslate-7ecid)

Returns a transform with an origin that’s offset by the specified vector.

### Decomposing a 3D projective transform

[`var rotation: Rotation3D?`](/documentation/Spatial/ProjectiveTransform3D/rotation)

The projective transform’s rotation.

[`static SPRotation3D SPProjectiveTransform3DGetRotation(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DGetRotation)

The projective transform’s rotation.

[`static SPSize3D SPProjectiveTransform3DGetScale(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DGetScale)

The projective transform’s scale.

[`static SPVector3D SPProjectiveTransform3DGetOffset(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DGetOffset)

The projective transform’s translation.

### Checking characteristics

[`func is3DProjection() -> Bool`](/documentation/Spatial/ProjectiveTransform3D/is3DProjection())

Returns a Boolean value that indicates whether the transform is a 3D projection.

[`func isUniform(overDimensions: Dimension3DSet) -> Bool`](/documentation/Spatial/ProjectiveTransform3D/isUniform(overDimensions:))

Returns a Boolean value that indicates whether the transform scales equally over the specified dimensions.

[`var isAffine: Bool`](/documentation/Spatial/ProjectiveTransform3D/isAffine)

A Boolean value that indicates whether the transform is affine.

[`var isInvertible: Bool`](/documentation/Spatial/ProjectiveTransform3D/isInvertible)

Returns a Boolean value that indicates whether the transform is invertible.

[`static bool SPProjectiveTransform3DIsUniformOverDimensions(SPProjectiveTransform3D transform, SPAxis dimensionFlags);`](/documentation/Spatial/SPProjectiveTransform3DIsUniformOverDimensions)

Returns a Boolean value that indicates whether the transform scales equally over the specified dimensions.

[`static bool SPProjectiveTransform3DIsValid(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DIsValid)

A Boolean value that indicates whether the transform is a valid transform.

[`static const SPProjectiveTransform3D SPProjectiveTransform3DInvalid;`](/documentation/Spatial/SPProjectiveTransform3DInvalid)

The null transform that represents an invalid value.

### Comparing values

[`func isApproximatelyEqual(to: ProjectiveTransform3D, tolerance: Double) -> Bool`](/documentation/Spatial/ProjectiveTransform3D/isApproximatelyEqual(to:tolerance:))

Returns a Boolean value that indicates whether two transforms are equal within a specified tolerance.

[`static bool SPProjectiveTransform3DAlmostEqualToTransform(SPProjectiveTransform3D t1, SPProjectiveTransform3D t2);`](/documentation/Spatial/SPProjectiveTransform3DAlmostEqualToTransform-5qqyc)

Returns a Boolean value that indicates whether two transforms are equal within a default tolerance.

[`static bool SPProjectiveTransform3DAlmostEqualToTransform(SPProjectiveTransform3D t1, SPProjectiveTransform3D t2, double tolerance);`](/documentation/Spatial/SPProjectiveTransform3DAlmostEqualToTransform-33crc)

Returns a Boolean value that indicates whether two transforms are equal within a specified tolerance.

### Applying arithmetic operations

[`static func * (ProjectiveTransform3D, ProjectiveTransform3D) -> ProjectiveTransform3D`](/documentation/Spatial/ProjectiveTransform3D/*(_:_:))

Returns the concatenation of two projective transforms.

[`static func *= (inout ProjectiveTransform3D, ProjectiveTransform3D)`](/documentation/Spatial/ProjectiveTransform3D/*=(_:_:))

Concatenates two projective transforms and stores the result in the left-hand-side variable.

### Deprecated symbols

[`var offset: Vector3D`](/documentation/Spatial/ProjectiveTransform3D/offset)

The projective transform’s translation.

[`var scale: Size3D?`](/documentation/Spatial/ProjectiveTransform3D/scale)

The projective transform’s scale.

[`func inverted() -> ProjectiveTransform3D?`](/documentation/Spatial/ProjectiveTransform3D/inverted())

Returns a new transform that results from inverting an existing projective transform.

[`init(matrix: simd_float4x4)`](/documentation/Spatial/ProjectiveTransform3D/init(matrix:)-zfb)

Creates a projective transform from the specified 4 x 4 single-precision matrix.

[`init(scale: Size3D, rotation: Rotation3D, translation: Size3D)`](/documentation/Spatial/ProjectiveTransform3D/init(scale:rotation:translation:)-8qxxq)

Creates a projective transform from the specified scale, rotate, and translate transforms.

[`init(fovyRadians: Double, aspectRatio: Double, nearZ: Double, farZ: Double, reverseZ: Bool)`](/documentation/Spatial/ProjectiveTransform3D/init(fovyRadians:aspectRatio:nearZ:farZ:reverseZ:))

Returns a projective transform with right-hand-side perspective and optional reverse-z.

[`init(translation: Size3D)`](/documentation/Spatial/ProjectiveTransform3D/init(translation:))

[`init(fovyRadians: Double, aspectRatio: Double, nearZ: Double, farZ: Double)`](/documentation/Spatial/ProjectiveTransform3D/init(fovyRadians:aspectRatio:nearZ:farZ:))

[`static void SPProjectiveTransform3DSetOffset(SPProjectiveTransform3D *transform, SPVector3D offset);`](/documentation/Spatial/SPProjectiveTransform3DSetOffset)

Sets the translation of a projective transform.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeTranslation(SPSize3D translation);`](/documentation/Spatial/SPProjectiveTransform3DMakeTranslation-5hc37)

Creates a projective transform from the specified translate transform.

[`static SPProjectiveTransform3D SPProjectiveTransform3DMakeWithRHPerspective(double fovyRadians, double aspectRatio, double nearZ, double farZ);`](/documentation/Spatial/SPProjectiveTransform3DMakeWithRHPerspective-97qwp)

Returns a projective transform with right-hand side perspective.

[`static SPProjectiveTransform3D SPProjectiveTransform3DTranslate(SPProjectiveTransform3D transform, SPSize3D size);`](/documentation/Spatial/SPProjectiveTransform3DTranslate-4tynj)

Returns a transform with an origin that’s offset by the specified size.

[`static SPVector3D SPProjectiveTransform3DGetTranslation(SPProjectiveTransform3D transform);`](/documentation/Spatial/SPProjectiveTransform3DGetTranslation)

The projective transform’s translation.

### Initializers

[`init(ProjectiveTransform3DFloat)`](/documentation/Spatial/ProjectiveTransform3D/init(_:)-7nv9f)

Returns a double-precision projective transformation from a single-precision projective transformation.

### Default Implementations

[CustomReflectable Implementations](/documentation/Spatial/ProjectiveTransform3D/CustomReflectable-Implementations)

[Scalable3DProtocol Implementations](/documentation/Spatial/ProjectiveTransform3D/Scalable3DProtocol-Implementations)

[Shearable3DProtocol Implementations](/documentation/Spatial/ProjectiveTransform3D/Shearable3DProtocol-Implementations)

[Transform3DProtocol Implementations](/documentation/Spatial/ProjectiveTransform3D/Transform3DProtocol-Implementations)

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Scalable3D`](/documentation/Spatial/Scalable3D)

[`Translatable3D`](/documentation/Spatial/Translatable3D)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

[`Transform3DProtocol`](/documentation/Spatial/Transform3DProtocol)

[`CustomReflectable`](/documentation/Swift/CustomReflectable)

[`Shearable3DProtocol`](/documentation/Spatial/Shearable3DProtocol)

[`Decodable`](/documentation/Swift/Decodable)

[`Translatable3DProtocol`](/documentation/Spatial/Translatable3DProtocol)

[`Rotatable3D`](/documentation/Spatial/Rotatable3D)

[`Copyable`](/documentation/Swift/Copyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`SpatialTypeProtocol`](/documentation/Spatial/SpatialTypeProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`Escapable`](/documentation/Swift/Escapable)

[`Scalable3DProtocol`](/documentation/Spatial/Scalable3DProtocol)

[`Encodable`](/documentation/Swift/Encodable)

[`Shearable3D`](/documentation/Spatial/Shearable3D)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Rotatable3DProtocol`](/documentation/Spatial/Rotatable3DProtocol)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)