Function

SCNMatrix4MakeRotation

Returns a matrix describing a rotation transformation.

Declaration

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

Parameters

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

See Also

Creating Transform Matrices

SCNMatrix4MakeTranslation

Returns a matrix describing a translation transformation.

SCNMatrix4MakeScale

Returns a matrix describing a scale transformation.