benilla-re systems structs docs

CMovement::FindBevelContacts

function · collision · primitive

Address
0x632280 · 470 bytes, up to 0x632455
Signature
void __thiscall (CMovement *this, void *list, float *dir, float len, float *s, float *p, float *v, uint8_t *i, uint32_t *hit, float *o, uint32_t *n, float *b)
Meaning
Collects the leading bevel faces that reach a facet first, within 1/720 of the nearest
Confidence
verified, proof one
Finding
collision/contact#bevel-contacts-and-the-band
Test
collision::candidate_collect_difftest

Finding: Bevel contacts and the band in collision: contact

0x632280(list, dir, len, s, planes, V, idx, hit, out, count, best), on a CMovement, runs the four bevels (planes 5 to 8, triangles from index byte 20). A bevel is leading when s·n > 0 or NaN; 0x632460 builds its prism and 0x632700 searches it with the cap len. A face finding a facet at t joins the contact list by the band rule, which 0x632ba0 applies to the box faces too. With b = *best, in order:

testeffect
t < b − 1/720the list becomes this face's plane alone
else t < b + 1/720the plane is appended
then t < b*best = t; with more than one entry, the last and the first swap

The tests are at 53 bits; a NaN changes nothing. The list holds the volume's own face planes; the facet is known only by hit.

The derivation is in the doc.

Callers 2

Callees 2

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