Skip to content

shz_xmtrx_rotate_dir

Markdown
SHZ_INLINE void shz_xmtrx_rotate_dir(float radians, float x, float y, float z) SHZ_NOEXCEPT;

Multiplies XMTRX by a 3D rotation matrix about a prenormalized axis.

NameTypeDescription
radiansfloatAngle of rotation, in radians.
xfloatX component of the unit axis of rotation.
yfloatY component of the unit axis of rotation.
zfloatZ component of the unit axis of rotation.

Nothing (void).

This is a faster version of shz_xmtrx_rotate() which skips normalizing the axis of rotation. Constructs a 4x4 rotation matrix of radians about the given axis, RIGHT multiplying it into XMTRX, leaving its translation column unmodified.

  • The vector components representing the axis of rotation must be prenormalized!
  • C++ equivalent: none (call the C function from C++)
  • Type-generic form: none
  • Back-ends: SH4: dedicated SH4 implementation · SW: portable C · SPU: shared C implementation
  • Defined in: sh4zam/shz_xmtrx.h:841
  • Module: XMTRX, section "GL Transformations"

shz_xmtrx_rotate, shz_xmtrx_init_rotation_dir