setScale(_:forTime:)
Sets the x-, y-, and z-axis scale factors of the transform for the specified time sample.
Declaration
func setScale(_ scale: vector_float3, forTime time: TimeInterval)Parameters
- scale:
The scale factors 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 translation, rotation, and shear factors, a scale factor 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 localTransform(atTime:) and setLocalTransform(_:forTime:) methods.
Setting a new scale synthesizes a complete transform matrix by combining the new translation with the translation(atTime:), rotation(atTime:), and shear(atTime:) 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.