get_align_matrix(3)
πΈ 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
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms