Function

SCNMatrix4Rotate

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

Declaration

iOS, Mac Catalyst, tvOS, watchOS
SCNMatrix4 SCNMatrix4Rotate(SCNMatrix4 m, float angle, float x, float y, float z);
macOS
SCNMatrix4 SCNMatrix4Rotate(SCNMatrix4 m, CGFloat angle, CGFloat x, CGFloat y, CGFloat z);

Parameters

mat

The matrix to be combined with a rotation.

angle

The amount of rotation, in radians, measured counterclockwise around the rotation axis.

x

The x-component of the rotation axis.

y

The y-component of the rotation axis.

z

The z-component of the rotation axis.

Return Value

A new matrix.

Discussion

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

See Also

Performing Matrix Operations

SCNMatrix4Translate

Returns a new matrix created by concatenating the specified matrix with a translation 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.