apply_quat(3alleg4)
β¨ NAME β¨
okay so bestie, this is apply_quat β she multiplies a point by a quaternion π«. Like, that's her whole thing. Part of the Allegro game programming library, in case you were wondering where she lives π.
πΈ SYNOPSIS πΈ
#include <allegro.h>
void apply_quat(const QUAT *q, float x, y, z, *xout, *yout, *zout);
no cap, that's the whole signature π
π DESCRIPTION π
So here's the tea β β apply_quat takes the point (x, y, z) and multiplies it by the quaternion q, then drops the glow-up into (*xout, *yout, *zout) β¨. Like, she rotates your point and hands you the new coordinates. Slay.
but bestie, listen π β she is quite a bit slower than apply_matrix_f(). That's not a vibe check she passes. So only use her to translate a few points, okay? A tiny little handful. She's not built for crowds.
if you've got many points?? π«Ά it is much more efficient to call quat_to_matrix() first and then hit apply_matrix_f() β that's the iconic move, fr fr. Convert once, apply many. main character efficiency π§
and that's the whole page, bestie π
this little love letter comes to you from Allegro, version 4.4.3, and she's filed under apply_quat(3alleg4) in the manual. mwah, go rotate something cute π¦π
π¦ 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