Instance Method

localTransform(atTime:)

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

Declaration

optional func localTransform(atTime time: TimeInterval) -> matrix_float4x4

Parameters

time

The time sample for which to request information.

Return Value

The local transformation matrix for the specified time sample.

Discussion

This matrix defines the position, orientation, shear, and scale for any object affected by the transform component, relative to the coordinate space of its parent, as of the specified time sample.

Requesting a sample outside the time range clamps returned values using the minimumTime and maximumTime properties. Some asset formats support continuous sampling, with interpolation for times between the samples stored in the asset; others are discrete. For an asset with discrete time information, requesting a sample time in between the samples stored in the asset returns data for the immediately preceding time.

See Also

Working with Animated Transforms

var minimumTime: TimeInterval

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

Required.

var maximumTime: TimeInterval

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

Required.

func setLocalTransform(matrix_float4x4, forTime: TimeInterval)

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

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