Instance Method

setTranslation:forTime:

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

Declaration

- (void)setTranslation:(vector_float3)translation forTime:(NSTimeInterval)time;

Parameters

translation

The translation vector to set for the transform relative to its parent coordinate space.

time

The time sample with which to associate transform information.

Discussion

Together with the rotation, scale, and shear factors, a translation vector 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.

Setting a new translation synthesizes a complete transform matrix by combining the new translation with the rotationAtTime:, scaleAtTime:, and shearAtTime: factors for the specified time. If the new time is outside the range of the minimumTime and maximumTime properties, this method updates those values to reflect the range of time samples stored in the transform object.

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.

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