clip3d(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’… clip3d β€” bestie edition

okay so this is the clip3d page from the Allegro manual, aka the Allegro game programming library, and we're gonna get you fluent in it, no cap 🫢


✨ NAME ✨

clip3d β€” clips the polygon you hand it in vtx, and it does the whole thing with fixed point math. part of the Allegro game programming library, periodt.


🌸 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[]);

like. that's the whole signature. it's giving "lots of pointers" and honestly? iconic of it. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so clip3d is literally just the fixed point version of clip3d_f(). same job, different number flavor.

⚠️ but listen β€” use this one with caution, fr fr. fixed point arithmetic has limited precision and a high chance of rounding errors, and it will absolutely humble you. the floating point code is better for most situations. that's not me being dramatic, that's the manual. πŸ’€

πŸŽ€ RETURN VALUE πŸŽ€

returns the number of vertices after clipping is done. that's it, that's the whole return. she's simple, she's efficient, she ate. ✨


πŸ’– SEE ALSO πŸ’–


and that's the page, bestie 🌈 this was Allegro version 4.4.3, sliding in with clip3d(3) energy, mwah πŸ’‹ go clip something gorgeous πŸ’œ

πŸ“¦ where this page comes from