get_align_matrix(3)

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

🌸 NAME 🌸

okay so this is the get_align_matrix(3) page from the Allegro manual, bestie. get_align_matrix β€” rotates a matrix to align it along specified coordinate vectors. It's part of the Allegro game programming library. periodt πŸ’–


✨ SYNOPSIS ✨

Here's the exact incantation, no cap:

#include <allegro.h>

void get_align_matrix(MATRIX *m, fixed xfront, yfront, zfront, fixed
xup, fixed yup, fixed zup);

πŸ¦‹ DESCRIPTION πŸ¦‹

So this function rotates a matrix so that it's aligned along the specified coordinate vectors. Those vectors do not need to be normalized or perpendicular β€” lowkey flexible, highkey useful. BUT the up and front must not be equal. That's the one rule. Do not let them be equal, fr fr. 😭

And if your front vector is 0,0,-1 and your up vector is 0,1,0, you get the identity matrix back. iconic πŸ‘‘

The arguments are MATRIX *m, fixed xfront, fixed yfront, fixed zfront, fixed xup, fixed yup, and fixed zup β€” that's the whole crew. πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

Go check those besties out too. 🫢


Allegro version 4.4.3, bestie πŸ’– no date in this footer, but get_align_matrix(3) is forever ✨

πŸ“¦ where this page comes from