CMovement::BuildVolume
function · collision · primitive
- Address
0x631be0· 646 bytes, up to0x631e65- 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:
| bytes | vertices | plane |
|---|---|---|
| 0 to 3 | 1, 2, 6, 5 | 0, x − r |
| 4 to 7 | 3, 4, 8, 7 | 1, x + r |
| 8 to 11 | 2, 3, 7, 6 | 2, y + r |
| 12 to 15 | 4, 1, 5, 8 | 3, y − r |
| 16 to 19 | 5, 6, 7, 8 | 4, top |
| 20 to 22 | 0, 1, 2 | 5 |
| 23 to 25 | 0, 3, 4 | 6 |
| 26 to 28 | 0, 2, 3 | 7 |
| 29 to 31 | 0, 4, 1 | 8 |
The derivation is in the doc.
Callers 2
- CMovement::MeasureHoverDrop collision
- CMovement::SweepVolume collision
Callees 1
- BuildVolumePlanes collision
Calls and jumps by a bare address, from tables/calls.tsv.