setToRotation

fun setToRotation(x: Double, y: Double, z: Double, angle: Angle): Matrix4

Sets this matrix to a rotation matrix with a specified axis and angle. Positive angles are interpreted as counter-clockwise rotation about the axis when viewed when viewed from the positive end of the axis, looking toward the negative end of the axis.
The result of this method is undefined if the axis components are not a unit vector.

Return

this matrix with its rotation components set to those specified and all other components set to that of an identity matrix

Parameters

x

the X component of the rotation axis unit vector

y

the Y component of the rotation axis unit vector

z

the Z component of the rotation axis unit vector

angle

the angle of rotation