benilla-re systems structs docs

InvertRigidMatrix

function · cmath · primitive

Address
0x7bd700 · 280 bytes, up to 0x7bd817
Signature
void __thiscall (NTempest::C44Matrix *this, NTempest::C44Matrix *out)
Meaning
Writes the rigid inverse of a 4×4 matrix: its 3×3 transposed, then translated by −t times that
Confidence
verified, proof one
Finding
collision/contact#facet-gather
Test
cmath::mat4_affine_invert

Finding: Facet gather in collision: contact

0x631e70(m), m a move by value, fills the facet lists for a sweep of a CMovement by m, with r = +0xb0 and H = +0xb4, in these steps. It returns 1 unless the solid query fails.

stepeffect
1on a transport (+0x38 nonzero): p (+0x10) and m to world by 0x630ac0's matrix M
2e = p + m; when the cached box 0xc4e5a0 holds (e.x − r, e.y − r, e.z) and (e.x + r, e.y + r, e.z + H): return 1
3query box: that box grown by 1/6 on every side, joined with the cached box
4solid query into 0xc4e52c, which empties the list first; failure returns 0 with the cache unchanged, so a later box inside it returns 1 over the emptied list
5a swimmer (0x200000): liquid query into 0xc4e564, its return ignored, every liquid plane reversed
6the cache becomes the query box
7on a transport: each solid facet into transport space by M⁻¹

The derivation is in the doc.

Callers 4

Callees 2

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