benilla-re systems structs docs

CMovement::BuildVolume

function · collision · primitive

Address
0x631be0 · 646 bytes, up to 0x631e65
Signature
void __thiscall (CMovement *this, const float *pos, float height, float *planes, float *verts, uint8_t *indices)
Meaning
Writes the volume's nine planes, nine vertices and 32 face index bytes at a position
Confidence
verified, proof one
Finding
collision/contact#volume-vertices-and-faces
Test
collision::resolve_clip_difftest

Finding: Volume vertices and faces in collision: contact

0x631be0(p, H, planes, verts, idx), on a CMovement, writes the planes of 0x631440(p, H, r) with r = +0xb0, nine vertices and 32 index bytes. V0 = p is the apex. V1 to V4 are the corners (p.x − r, p.y − r), (p.x − r, p.y + r), (p.x + r, p.y + r) and (p.x + r, p.y − r) at the waist p.z + r·1.849399 (0x3fecb91b, 0x80c740); V5 to V8 are the same corners at p.z + H. The index bytes list the faces of the planes in plane order:

bytesverticesplane
0 to 31, 2, 6, 50, x − r
4 to 73, 4, 8, 71, x + r
8 to 112, 3, 7, 62, y + r
12 to 154, 1, 5, 83, y − r
16 to 195, 6, 7, 84, top
20 to 220, 1, 25
23 to 250, 3, 46
26 to 280, 2, 37
29 to 310, 4, 18

The derivation is in the doc.

Callers 2

Callees 1

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