qtranslate_matrix(3)

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

✨ qtranslate_matrix β€” the glow-up your matrix deserved ✨

okay so bestie, we're in the Allegro manual rn and today's main character is qtranslate_matrix(3). yes it's a man page, yes it's section 3, and yes it's about to be your new fave. πŸ’–


🌸 NAME 🌸

qtranslate_matrix, qtranslate_matrix_f β€” the optimised routine for translating a matrix you already generated. no cap. it's part of the Allegro game programming library, so it's giving "I help you move things in 3D space without wasting your whole afternoon". πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

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

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

two flavours, one vibe. the plain one takes MATRIX *m plus fixed x, fixed y, fixed z. the _f one is the float-coded sibling: MATRIX_f *m plus float x, float y, float z. slay. πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so here's the tea, bestie: this is the optimised routine for translating an already generated matrix. and the way it does it?? it simply adds in the translation offset. that's it. that's the whole move. ✨

which means β€” and this is the part you should be obsessed with β€” there is no need to build two temporary matrices and then multiply them together. no extra matrices, no whole multiplication arc, none of that drama. your matrix gets translated, you move on with your life, you go be iconic elsewhere. πŸ¦‹

ngl this is the "just edit the thing directly" energy and honestly? we respect it.

🌈 SEE ALSO 🌈


and that's the whole page, bestie!! this one's from the Allegro manual, version 4.4.3, and yes it's literally titled qtranslate_matrix(3) at the bottom too β€” cute, consistent, we love that for it. πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from