benilla-re systems structs docs

DoBoxesOverlap

function · cmath · unreached

Address
0x7c3780 · 1160 bytes, up to 0x7c3c07
Signature
uint8_t __fastcall (const OrientedBox *a, const OrientedBox *b)
Meaning
Returns 1 when two oriented boxes overlap on all fifteen separating axes
Confidence
verified, proof two
Finding
cmath/solids#box-against-box

Finding: Box against box in cmath: boxes, cones and triangles

0x7c3780 takes two oriented boxes and returns 1 when none of the fifteen axes separates them. A box is 15 floats: the centre at +0, half-extents at +0xc, and three unit axis rows at +0x18, +0x24 and +0x30. With t the centre of edx minus the centre of ecx and R[i][j] the dot of axis i of ecx with axis j of edx, it tests the three axes of ecx, the three of edx, then the nine cross axes A_i × B_j in row order. Axis A_i × B_j, with (i, k, m) and (j, l, n) cyclic, separates when |R[k][j]·(t·A_m) − R[m][j]·(t·A_k)| is greater than |R[k][j]|·hA_m + |R[m][j]|·hA_k + |R[i][l]|·hB_n + |R[i][n]|·hB_l. No epsilon is added to any R.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 0

None by a direct call or jump.

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