benilla-re systems structs docs

BuildQuadPrism

function · collision · primitive

Address
0x632f80 · 636 bytes, up to 0x6331fb
Signature
uint32_t __fastcall (const float *verts, const uint8_t *quad, const float *face, const float *sweep, float *planes)
Meaning
Writes the edge planes of a quad swept along a vector, and its far cap; 0 for a degenerate edge
Confidence
verified, proof one
Finding
collision/contact#face-prisms

Finding: Face prisms in collision: contact

0x632460(V, tri, face, s, out) and 0x632f80(V, quad, face, s, out) bound the prism a volume face sweeps along s. Each edge A = V[k_j] to B = V[k_(j+1)], with A' = A + s, gives one plane:

caseresult
squared length of (B − A) × (A' − A) below 2^−20 (0x35800000)return 0; NaN continues
otherwiseplane through A, B, A', normal normalize((B − A) × (A' − A)) by 0x637480
a face vertex off the edge strictly on its positive sidethe plane reversed with d
after the edges, out[3] or out[4]the face's normal, d = −n·(V[k_0] + s), V[k_0] + s unrounded

The vertex off the edge is the triangle's k_(j+2), the quad's k_(j−1). Both return 1. The callers clip by the edge planes alone, so the region is the face outline extruded along s both ways.

The derivation is in the doc.

Callers 1

Callees 4

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