benilla-re systems structs docs

FindNearestFacet

function · collision · primitive

Address
0x632700 · 299 bytes, up to 0x63282a
Signature
uint32_t __fastcall (void *list, float *dir, float *prism, uint32_t n, float *planes, uint32_t face, float *best, uint32_t *hit, uint64_t guid)
Meaning
Finds the facet, among those facing against a direction, that a volume face reaches first
Confidence
verified, proof one
Finding
collision/contact#nearest-facet-per-face
Test
collision::per_face_toi_difftest

Finding: Nearest facet per face in collision: contact

0x632700(list, dir, prism, n, planes, k, best, hit) finds, for volume face k, the facet the face reaches first. A record is skipped unless n·dir ≤ −1·10⁻⁵ (0xb727c5ac, 0x80c5c4) or NaN: only a facet facing against the motion counts. Its three vertices, tagged −1, are clipped by the n prism planes; what is left goes to 0x632830 with the distance FLT_MAX (0x7f7fffff). A distance at or below *best, never NaN, is stored in *best with the record's index in *hit. Returns 1 when any record was stored. Two more dwords, the owner's GUID, are passed and never read.

The derivation is in the doc.

Callers 2

Callees 2

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