clip3d(3alleg4)

✨ clip3d ✨

okay bestie, welcome to the Allegro manual, specifically the page for clip3d β€” the fixed point girlie of the clipping world πŸ’…


πŸŽ€ NAME πŸŽ€

clip3d β€” clips the polygon given in vtx using fixed point math. part of the Allegro game programming library, no cap 🫢


🌸 SYNOPSIS 🌸

#include <allegro.h>

int clip3d(int type, fixed min_z, fixed max_z, int vc, const V3D *vtx[],
V3D *vout[], V3D *vtmp[], int out[]);

πŸ’– DESCRIPTION πŸ’–

so this is literally the fixed point version of clip3d_f() ✨

but listen, bestie β€” use this one with caution 😭 because fixed point arithmetic has limited precision and there is a high chance of rounding errors. like, the floating point code is better for most situations, fr fr. it's giving "only if you know what you're doing" energy πŸ’€

⚠️ not me warning you twice: limited precision + rounding errors = risky. clip3d_f() is the safer main character for most cases πŸ‘‘

🌈 RETURN VALUE 🌈

returns the number of vertices after clipping is done πŸ’« iconic, simple, slay.


πŸ‘‘ SEE ALSO πŸ‘‘


Allegro version 4.4.3 β€” mwah, that's the version this page is serving, periodt πŸ’…βœ¨ πŸŽ€ πŸ¦‹ πŸ’–