benilla-re systems structs docs

ComputeTrianglePushback

function · collision · primitive

Address
0x634300 · 85 bytes, up to 0x634354
Signature
void __thiscall (void *this, float *out, const void *list, const float *dir, float dist, uint32_t index)
Meaning
Writes -(n.dir)·dist·n for the normal n of a list's triangle
Confidence
verified, proof one
Finding
collision/resolve#free-move-slide
Test
collision::resolve_state_difftest

Finding: Free-move slide in collision: resolve

After a hit, with T = float(ms) and U the time used, the call takes these steps:

stepaction
1t = a/rem·(T − U), then rem −= a
2t + 2^-20 > 1: U += t, stall count c = 1; else c += 1, ending at c > 5
3T − U < 1 ends
4p = −(n·u)·rem·n (0x634300), n the normal of the triangle hit, in its list
5m = u·rem + p, rem = float(|m|); rem < 2^-20 ends
6u = float(m·(1/rem)), 1/rem kept at 53 bits (0x6348c5, 0x6348f5); sweep 0xc4e52c only, and loop as for the first sweep

0x7c5cd0(0) runs at every end except a failed sweep, and, before any slide, a move without a hit or a time end with |T − U| < 2^-20.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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