Class

MDLTransform

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

Declaration

@interface MDLTransform : NSObject

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 property.

Topics

Creating a Transform Object

- initWithIdentity

Initializes a transform object to the identity transformation.

Deprecated
- initWithMatrix:

Initializes a transform object with the specified transform matrix.

- initWithTransformComponent:

Initializes a transform object to match the specified transform component.

Using Factors of a Static Transform

translation

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

rotation

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

scale

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

shear

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

- setIdentity

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

Using Factors of an Animated Transform

- translationAtTime:

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:

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

- rotationAtTime:

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

- rotationMatrixAtTime:

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

- setRotation:forTime:

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

- scaleAtTime:

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:

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

- shearAtTime:

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:

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

Initializers

Relationships

Inherits From

See Also

3D Asset Basics

MDLAsset

An indexed container for 3D objects and associated information, such as transform hierarchies, meshes, cameras, and lights.

MDLObject

The base class for objects that are part of a 3D asset, including meshes, cameras, and lights.

MDLMesh

A container for vertex buffer data to be used in rendering a 3D object.

MDLSubmesh

A container for index buffer data and material information to be used in rendering all or part of a 3D object.

MDLSubmeshTopology

A description of how a submesh's index buffer data is arranged and how that arrangement should be used to produce the submesh's intended 3D shape.

MDLNamed

The common interface for Model I/O objects that expose a human-readable name.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software