apply_quat(3)
β¨ apply_quat β¨
okay so bestie, welcome to another iconic page from the Allegro manual β this one's apply_quat(3), and it's giving "multiply a point by a quaternion" energy π
fr fr.
πΈ NAME πΈ
apply_quat β multiplies a point by a quaternion. Part of the Allegro game programming library, periodt π
π¦ SYNOPSIS π¦
#include <allegro.h>
void apply_quat(const QUAT *q, float x, y, z, *xout, *yout, *zout);
π DESCRIPTION π
So here's the vibe: you take the point (x, y, z), you multiply it by the quaternion q, and the result lands all cozy in (*xout, *yout, *zout). Slay β¨
But ngl, lowkey important heads-up: this is quite a bit slower than apply_matrix_f(). So only use it to translate a few points, okay? Like, a few. Not a whole army of them π
If you've got many points to get through, it's much more efficient to call quat_to_matrix() first and then hit apply_matrix_f(). That's the move. Trust. π₯
π«Ά reminder: a few points =apply_quat. many points =quat_to_matrix()+apply_matrix_f(). iykyk π
and that's the whole page, bestie β no cap π§ from the Allegro manual, version 4.4.3, dated right there alongside apply_quat(3). mwah, go multiply something cute ππ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms