Skip to content

shz_xmtrx_init_rotation_dir

Markdown
SHZ_INLINE void shz_xmtrx_init_rotation_dir(float angle, float x, float y, float z) SHZ_NOEXCEPT;

Initializes XMTRX to contain a 3D rotation matrix of angle radians about the given axis.

NameTypeDescription
anglefloat
xfloat
yfloat
zfloat

Nothing (void).

This is a faster version of shz_xmtrx_init_rotation() or glRotatef() which requires being passed a unit vector for the rotation axis.

  • The vector components representing the axis of rotation must be prenormalized!

shz_xmtrx_init_rotation