Skip to content

shz_xmtrx_rotate

Markdown
SHZ_INLINE void shz_xmtrx_rotate(float radians, float xAxis, float yAxis, float zAxis) SHZ_NOEXCEPT;

Multiplies XMTRX by a 3D rotation matrix about an arbitrary axis.

NameTypeDescription
radiansfloatAngle of rotation, in radians.
xAxisfloatX component of the axis of rotation.
yAxisfloatY component of the axis of rotation.
zAxisfloatZ component of the axis of rotation.

Nothing (void).

Constructs a 4x4 rotation matrix of radians about the axis with the given components, RIGHT multiplying it into XMTRX, overwriting its previous contents. This rotates within the local frame of XMTRX, about its own origin, leaving the translation column unmodified.

The axis does not need to be normalized.

  • This is the equivalent of glRotatef().
  • 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:823
  • Module: XMTRX, section "GL Transformations"

shz_xmtrx_rotate_dir, shz_xmtrx_rotate_x, shz_xmtrx_rotate_y, shz_xmtrx_rotate_z, shz_xmtrx_rotate_xyz