GET_VECTOR_ROTATION_MATRIX_F(3alleg4)
π get_vector_rotation_matrix β Allegro manual, bestie edition π
okay so we're in the Allegro manual, and this page is literally about spinning stuff around an axis. it's giving math but make it cute. two whole functions, one for fixed girlies and one for the float girlies. no cap.
β¨ NAME β¨
get_vector_rotation_matrix, get_vector_rotation_matrix_f β these two build X, Y, Z rotation matrices when you hand them an angle. they live in the Allegro game programming library, obviously. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
void get_vector_rotation_matrix(MATRIX *m, fixed x, y, z, fixed a);
void get_vector_rotation_matrix_f(MATRIX_f *m, float x, y, z, float a);
π¦ DESCRIPTION π¦
okay so listen. this function constructs a transformation matrix β and what that matrix does is rotate points around the vector you specify with x, y, z (that's your axis, bestie, your little arrow through space), by the angle you give it in a.
and here's the tea about that angle: it's in binary, 256 degrees to a circle format. so a full circle is 256, not 360. don't come at it with radians, it will not understand you. π
one version takes fixed values, the other takes float values. pick your fighter. both slay. β¨
π SEE ALSO π
apply_matrix(3alleg4)β actually use the matrix you just built, iconic behaviourget_rotation_matrix(3alleg4)β the axis-aligned siblingget_align_matrix(3alleg4)β for when you wanna align to a directionexcamera(3alleg4)β camera vibes, iykyk
and that's the whole page, bestie π«Ά this was Allegro version 4.4.3, written down and everything, so go forth and rotate responsibly. 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