Function

SCNMatrix4MakeTranslation

Returns a matrix describing a translation transformation.

Declaration

iOS, Mac Catalyst, tvOS, watchOS
SCNMatrix4 SCNMatrix4MakeTranslation(float tx, float ty, float tz);
macOS
SCNMatrix4 SCNMatrix4MakeTranslation(CGFloat tx, CGFloat ty, CGFloat tz);

Parameters

x

The translation distance in the x-axis direction.

y

The translation distance in the y-axis direction.

z

The translation distance in the z-axis direction.

Return Value

A new translation matrix.

See Also

Creating Transform Matrices

SCNMatrix4MakeRotation

Returns a matrix describing a rotation transformation.

SCNMatrix4MakeScale

Returns a matrix describing a scale transformation.