<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLTransform",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLTransform"
  },
  "title" : "MDLTransform"
}
-->

# MDLTransform

A description of the local coordinate space transformations for a 3D object.

```
class MDLTransform
```

## Overview

Transform information can be static, or in the case of resources that describe animations, time based. You use transform objects to position, orient, shear, and scale the meshes, cameras, lights, and container objects in an asset using their [`transform`](/documentation/ModelIO/MDLObject/transform) property.

## Topics

### Creating a Transform Object

[`-  initWithIdentity`](/documentation/ModelIO/MDLTransform/init(identity:))

Initializes a transform object to the identity transformation.

[`-  initWithMatrix:`](/documentation/ModelIO/MDLTransform/init(matrix:))

Initializes a transform object with the specified transform matrix.

[`-  initWithTransformComponent:`](/documentation/ModelIO/MDLTransform/init(transformComponent:))

Initializes a transform object to match the specified transform component.

[`-  initWithMatrix:resetsTransform:`](/documentation/ModelIO/MDLTransform/init(matrix:resetsTransform:))

[`-  initWithTransformComponent:resetsTransform:`](/documentation/ModelIO/MDLTransform/init(transformComponent:resetsTransform:))

### Using Factors of a Static Transform

[`translation`](/documentation/ModelIO/MDLTransform/translation)

The x-, y-, and z-axis offsets of the transform relative to its parent coordinate space.

[`rotation`](/documentation/ModelIO/MDLTransform/rotation)

The orientation, as a vector of Euler angles in radians, of the transform relative to its parent coordinate space.

[`scale`](/documentation/ModelIO/MDLTransform/scale)

The x-, y-, and z-axis scale factors of the transform relative to its parent coordinate space.

[`shear`](/documentation/ModelIO/MDLTransform/shear)

The x-, y-, and z-axis shear factors of the transform relative to its parent coordinate space.

[`-  setIdentity`](/documentation/ModelIO/MDLTransform/setIdentity())

Sets all factors of the transform to those of the identity transformation.

### Using Factors of an Animated Transform

[`-  translationAtTime:`](/documentation/ModelIO/MDLTransform/translation(atTime:))

Returns the x-, y-, and z-axis offsets of the transform relative to its parent coordinate space, as of the specified time sample.

[`-  setTranslation:forTime:`](/documentation/ModelIO/MDLTransform/setTranslation(_:forTime:))

Sets the x-, y-, and z-axis offsets of the transform for the specified time sample.

[`-  rotationAtTime:`](/documentation/ModelIO/MDLTransform/rotation(atTime:))

Returns the orientation of the transform relative to its parent coordinate space, as of the specified time sample.

[`-  rotationMatrixAtTime:`](/documentation/ModelIO/MDLTransform/rotationMatrix(atTime:))

Returns the orientation of the transform as a rotation matrix, as of the specified time sample.

[`-  setRotation:forTime:`](/documentation/ModelIO/MDLTransform/setRotation(_:forTime:))

Sets the orientation of the transform for the specified time sample.

[`-  scaleAtTime:`](/documentation/ModelIO/MDLTransform/scale(atTime:))

Returns the x-, y-, and z-axis scale factors of the transform relative to its parent coordinate space, as of the specified time sample.

[`-  setScale:forTime:`](/documentation/ModelIO/MDLTransform/setScale(_:forTime:))

Sets the x-, y-, and z-axis scale factors of the transform for the specified time sample.

[`-  shearAtTime:`](/documentation/ModelIO/MDLTransform/shear(atTime:))

Returns the x-, y-, and z-axis shear factors of the transform relative to its parent coordinate space, as of the specified time sample.

[`-  setShear:forTime:`](/documentation/ModelIO/MDLTransform/setShear(_:forTime:))

Sets the x-, y-, and z-axis shear factors of the transform for the specified time sample.

[`-  setMatrix:forTime:`](/documentation/ModelIO/MDLTransform/setMatrix(_:forTime:))

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

[`MDLComponent`](/documentation/ModelIO/MDLComponent)

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

[`MDLTransformComponent`](/documentation/ModelIO/MDLTransformComponent)

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

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

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

[`NSCopying`](/documentation/Foundation/NSCopying)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)