al_translate_transform_3d(3alleg5)

πŸ“¦
version 5.2.11.3 Β· 4 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ al_translate_transform_3d β€” Allegro 5 API ✨

okay bestie, welcome to section 3alleg5 of the Allegro reference manual, aka the place where we make 3D stuff move around πŸ’… this one is literally so useful and so tiny, you're gonna eat it up.


🌸 SYNOPSIS 🌸

#include <allegro5/allegro.h>

void al_translate_transform_3d(ALLEGRO_TRANSFORM *trans, float x, float y,
    float z)

that's it. that's the whole signature. no cap. 🫢


πŸ’– DESCRIPTION πŸ’–

so what does it do? it takes the transformation you hand it (trans, your little ALLEGRO_TRANSFORM * bestie) and combines it with a transformation that translates coordinates by the vector you pass in β€” <x>, <y>, <z>, all floats. πŸ’«

"combines" here is doing heavy lifting, so let's be clear: you're not replacing your transform, you're mashing it together with a translate. it's giving glow-up, it's giving layering, it's giving main character energy. πŸ‘‘

the vector is the three floats, the transform is the pointer, and the result is your trans getting translated coordinates. periodt.


⭐ SINCE ⭐

5.1.3 β€” so if you're on anything older than that, this function said "not me" and you gotta upgrade, fr fr. πŸ¦‹


πŸŽ€ SEE ALSO πŸŽ€


lowkey reminder: trans is a pointer, so this thing is mutating the transform you pass in. it's not out here making you a brand new one. just so we're clear. πŸ’€

and that's the whole page, babe πŸ’– this was page al_translate_transform_3d(3alleg5) from the Allegro reference manual, dated the classic Allegro manual way, and you're officially fluent now. mwah. πŸŽ€βœ¨πŸŒˆπŸ«Ά

πŸ“¦ where this page comes from