apply_matrix(3alleg4)
π apply_matrix β bestie edition π
okay so this is apply_matrix, apply_matrix_f from the Allegro manual, section 3alleg4, and it's literally the "multiply a point by a transformation matrix" girlies π
β¨ NAME β¨
apply_matrix, apply_matrix_f β Multiplies a point by a transformation matrix. Allegro game programming library. π¦
β¨ SYNOPSIS β¨
#include <allegro.h>
void apply_matrix(const MATRIX *m, fixed x, y, z, *xout, *yout, *zout);
void apply_matrix_f(const MATRIX_f *m, float x, y, z, *xout, *yout,
*zout);
β¨ DESCRIPTION β¨
ok so picture this: you have a point, right? it's just vibing at (x, y, z). πΈ and you have a transformation matrix m. and you want the point to go through the matrix and come out the other side as a whole new point.
that's it. that's the function. π
apply_matrix takes the point (x, y, z), multiplies it by the transformation matrix m, and drops the result into (*xout, *yout, *zout). iconic behavior, no cap. π
and apply_matrix_f is the exact same thing except it's the float version β it takes a MATRIX_f *m and float coordinates instead of fixed ones and a MATRIX *m. same energy, different data type. β¨
heads up bestie: the results go into the pointers you pass as*xout,*yout,*zoutβ so make sure those actually point somewhere real, fr fr. π
β¨ SEE ALSO β¨
go read those too, they ate. π₯
and that's the whole page, bestie π«Ά this was the Allegro manual, version 4.4.3, and yeah the original footer said apply_matrix(3alleg4) on both ends, so consider this your cute lil sign-off: Allegro 4.4.3, apply_matrix, section 3alleg4. periodt. π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms