Protocol

MDLTransformComponent

The general interface for classes that manage local coordinate space transforms for 3D objects

Declaration

@protocol MDLTransformComponent

Overview

Transform information—that is, the combination of an object's position, orientation, shear, and scale—can be static, or in the case of resources that describe animations, time-based. By default, the MDLTransform class manages transform information for objects loaded from a MDLAsset instance. By providing your own class that adopts this protocol, you can support other ways to associate transform information with objects—for example, when defining a custom asset file format.

Topics

Working with Static Transforms

matrix

The transform matrix that defines the local coordinate space relative to a parent coordinate space.

Required.

- setLocalTransform:

Sets a new static transform matrix, overriding any time-based transform information.

Working with Animated Transforms

minimumTime

The timestamp for the first timed data sample in the transform component.

Required.

maximumTime

The timestamp for the last timed data sample in the transform component.

Required.

- localTransformAtTime:

Returns the local transform matrix as of the specified time sample.

- setLocalTransform:forTime:

Sets a new local transform matrix for the specified time sample.

Deriving a Global Transformation

+ globalTransformWithObject:atTime:

Returns the absolute coordinate transformation for an object in a transform hierarchy.

Required.

Instance Properties

keyTimes

Required.

Relationships

Inherits From

See Also

Extensible Asset Format Support

MDLComponent

The base protocol for extensible file format support in Model I/O.

MDLObjectContainer

A default implementation for handling object hierarchy relationships in a 3D asset.

MDLObjectContainerComponent

The general interface for classes that can act as containers in an object hierarchy.

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