benilla-re systems structs docs

InvertMatrix3

function · cmath · primitive

Address
0x7be2a0 · 121 bytes, up to 0x7be318
Signature
NTempest::C33Matrix * __thiscall (NTempest::C33Matrix *this, NTempest::C33Matrix *out, float determinant)
Meaning
Writes a 3x3 matrix's adjugate scaled by 1/determinant
Confidence
verified, proof one
Finding
collision/airborne#crease-helpers
Test
cmath::inv3

Finding: Crease helpers in collision: airborne

0x634fc0(out, tri, A, B) solves the three planes' normals as rows against −d, through the determinant 0x7be0e0 and the inverse 0x7be2a0, with no zero test. 0x634da0(out, i, P, c) walks triangle i's edges e_k = v_k − v_(k+1 mod 3), skipping any shorter than 2^-22, and keeps the unit edge with the smallest squared distance: for an edge parallel to c (|e·c − 1| < 2^-20), 0x634f40(v_k, P, c), the squared distance from v_k to the line through P along c; otherwise (k·v_k − k·P)², k = e × c, each dot summed z, y, x. The search starts at FLT_MAX and keeps only a strictly smaller value; with none it returns (0, 0, 0).

The derivation is in the doc.

Callers 2

Callees 1

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