get_trans...ion_matrix(3alleg4)
๐ get_transformation_matrix ๐
ok so bestie, this one's from the Allegro manual (the game programming library, you know the vibe ๐ฎโจ), and it's genuinely one of those functions that makes 3D stuff go brrr. Let me put you on.
โจ NAME โจ
get_transformation_matrix โ constructs X, Y, Z rotation matrices with an angle and scaling. it's giving Allegro game programming library energy fr fr ๐ฆ
๐ธ SYNOPSIS ๐ธ
#include <allegro.h>
void get_transformation_matrix(MATRIX *m, fixed scale, fixed xrot, yrot,
zrot, x, y, z);
๐ DESCRIPTION ๐
okay so here's the tea โ โ this function builds you a transformation matrix, and that matrix is about to do three things to your points, in order, no skipping:
- rotate them around all three axes by the amounts you pass in (and heads up, those angles are in binary, 256 degrees to a circle format โ not your regular degrees, bestie, don't get caught slipping ๐ญ)
- scale the result by the amount you specify โ and listen, if you want no change of scale, you pass
1. that's it.1. periodt ๐ - then translate to the
x,y,zposition you asked for
so it's rotate โ scale โ translate, and you get one shiny MATRIX out of it. iconic behavior honestly ๐
๐ SEE ALSO ๐
like obviously you're gonna need the rest of the squad:
apply_matrix(3alleg4)get_rotation_matrix(3alleg4)get_scaling_matrix(3alleg4)get_translation_matrix(3alleg4)ex3d(3alleg4)exstars(3alleg4)
and that's the whole page, no notes ๐ซถ
this was brought to you by Allegro version 4.4.3 โ yeah she's been around a minute but she still slays, okurrr ๐โจ๐ go make something cute in 3D for me, mwah ๐
๐ฆ 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