al_rotate_transform_3d(3alleg5)

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

πŸ’« al_rotate_transform_3d β€” the Allegro 5 API glow-up πŸ’«

okay bestie, you found a page in the Allegro reference manual (that's the <3alleg5> section of the Allegro 5 API, iykyk) and it's literally about spinning stuff in 3D. let's get into it πŸŒ€


✨ NAME ✨

al_rotate_transform_3d β€” Allegro 5 API

πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro5/allegro.h>

void al_rotate_transform_3d(ALLEGRO_TRANSFORM *trans,
   float x, float y, float z, float angle)

πŸ¦‹ DESCRIPTION πŸ¦‹

so what it does: it takes the transformation you hand it and combines it with a transformation that rotates coordinates around the given vector by the given angle in radians. two transformations, one slay. πŸ’…

⚠️ note, and this one matters: the vector is assumed to be of unit length. if it's not? you're not just rotating anymore β€” you'll also incur a scale. so like, normalize it first unless the stretch is the vibe you're going for. no cap.

⭐ SINCE ⭐

5.1.3 β€” so it's been around a minute, it's a classic πŸ‘‘


and that's the whole page, fr fr. Allegro reference manual energy, al_rotate_transform_3d(3alleg5) behavior, and every last detail accounted for. go rotate something iconic πŸ’–βœ¨πŸ«Ά

πŸ“¦ where this page comes from