Function

SCNMatrix4Translate

Returns a new matrix created by concatenating the specified matrix with a translation transformation.

Declaration

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

Parameters

mat

The matrix to be combined with a translation.

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

Discussion

The resulting transformation consists of the specified translation followed by the transformation represented by the mat parameter.

See Also

Performing Matrix Operations

SCNMatrix4Rotate

Returns a new matrix created by concatenating the specified matrix with a rotation transformation.

SCNMatrix4Scale

Returns a new matrix created by concatenating the specified matrix with a scale transformation.

SCNMatrix4Invert

Returns the inverse of the specified matrix.

SCNMatrix4Mult

Returns the product of two matrices.