Instance Method

rotationMatrixAtTime:

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

Declaration

- (matrix_float4x4)rotationMatrixAtTime:(NSTimeInterval)time;

Parameters

time

The time sample for which to request information.

Return Value

The orientation, as a rotation matrix, of the transform.

Discussion

A rotation matrix provides the same information as the vector returned by the rotationAtTime: method, but in a form more convenient for multiplying with position vectors.

Together with the translation, scale, and shear factors, rotation information defines the local coordinate space for any object affected by the transform, relative to a parent coordinate space. To work with the complete transform, use the localTransformAtTime: and setLocalTransform:forTime: methods.

Requesting a sample outside the time range clamps results to the minimumTime or maximumTime sample. 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

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.

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