benilla-re systems structs docs

InvertMatrix4WithDeterminant

function · cmath · primitive

Address
0x7bd6c0 · 50 bytes, up to 0x7bd6f1
Signature
NTempest::C44Matrix * __thiscall (NTempest::C44Matrix *this, NTempest::C44Matrix *out, float det)
Meaning
Writes the inverse of a 4x4 matrix given its determinant
Confidence
inferred
Finding
models/scene#segment-collision
Test
cmath::mat4_inverse_from_det

Finding: Segment collision in models: the scene

0x7099e0(p0, p1, &f) finds the nearest collision triangle of the scene's hit-test instances on the segment within the fraction f, writes the hit's fraction to f and returns the instance's user value +0x41c, else 0. A segment or f under 1e-5 returns 0. Each listed, loaded instance is first a sphere: its current sequence's bounds, or the model's when that radius is 0, through the base matrix; the sphere must meet the line with its near point before the segment end and its far point not behind the start. Candidates sorted by near then far distance are tested while their near distance is under the best hit, and only mode 3 instances test triangles. Every call empties the hit list.

The derivation is in the doc.

Callers 6

Callees 2

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