get_rotation_matrix(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’« get_rotation_matrix β€” Allegro manual ✨

okay so bestie, welcome to get_rotation_matrix(3) πŸ’– this is an Allegro game programming library page, and it's literally about spinning things around. yes. all three axes. we love to see it.


🌸 NAME 🌸

get_rotation_matrix, get_rotation_matrix_f β€” these two cuties construct X, Y, Z rotation matrices πŸŽ€ (Allegro game programming library, iykyk)


✨ SYNOPSIS ✨

#include <allegro.h>

void get_rotation_matrix(MATRIX *m, fixed x, fixed y, fixed z);

void get_rotation_matrix_f(MATRIX_f *m, float x, float y, float z);

πŸ’… DESCRIPTION πŸ’…

so what do these actually do? they construct a transformation matrix that rotates points around all three axes by the amounts you hand them πŸŒ€ and those amounts are given in binary, 256 degrees to a circle format. that's the vibe. that's the whole deal.

now, how do you figure out which way it's gonna rotate? girl, the right-hand rule has entered the chat πŸ‘‘ Point the dumb of your right hand towards the origin along the axis of rotation, and your fingers will curl in the positive direction of rotation. that's it, that's the trick, no cap.

for example: if you rotate around the y axis and look at the scene from above, a positive angle will rotate in the clockwise direction πŸ• ok noted, iconic, periodt.


πŸ¦‹ SEE ALSO πŸ¦‹


okay that's the whole page bestie 🫢 this one's from Allegro, version 4.4.3 β€” go rotate something, you got this πŸ’œπŸŒΈβœ¨

πŸ“¦ where this page comes from