benilla-re systems structs docs

ClipOutcode

function · gxumath · unreached

Address
0x5c5e30 · 170 bytes, up to 0x5c5ed9
Signature
uint32_t __fastcall (const NTempest::C44Matrix *m, const float *point)
Meaning
Returns six sign bits of the point transformed by a matrix against its w
Confidence
verified, proof one
Finding
gxumath#clip-outcode

Finding: Clip outcode in gxumath

0x5c5e30 (ecx a matrix, edx a point) transforms (x, y, z, 1) by 0x7bcb40 to (x', y', z', w') and returns six bits, each set when the float's sign bit is: bit 0 w' − x', bit 1 x' + w', bit 2 w' − y', bit 3 y' + w', bit 4 w' − z', bit 5 z' + w', each rounded to float first. A point inside the clip volume gives 0, apart from −0.0 and NaN with their sign bits. It has no caller.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

Calls and jumps by a bare address, from tables/calls.tsv.