benilla-re systems structs docs

BuildVolumePlanes

function · collision · primitive

Address
0x631440 · 432 bytes, up to 0x6315ef
Signature
void __stdcall (const float *pos, float height, float radius, float *planes)
Meaning
Writes nine planes: a box of half-width radius up to height, over a square pyramid with its apex at pos
Confidence
verified, proof one
Finding
collision/contact#volume-planes
Test
collision::kdop_difftest

Finding: Volume planes in collision: contact

0x631440(p, H, r, out) writes the nine planes of the volume at position p: a box of half-width r around p up to p.z + H, closed below by four bevels through p. With a = 0.8796419 (0x3f613036, 0x80dfe4) and b = 0.4756366 (0x3ef386a4, 0x80dfe0), the sine and cosine of 61.6°, a bevel rises a/b = 1.849399 per yard out from p. Each d is one 53-bit sum in the order shown, stored as a float; the products by 0.0 carry a NaN or infinite coordinate into d.

planenormald
0(−1, 0, 0)p.x − r
1(1, 0, 0)−p.x − r
2(0, 1, 0)−p.y − r
3(0, −1, 0)p.y − r
4(0, 0, 1)−p.z − H
5(−a, 0, −b)p.x·a + p.z·b + p.y·0
6(a, 0, −b)p.z·b − p.x·a + p.y·0
7(0, a, −b)p.x·0 + p.z·b − p.y·a
8(0, −a, −b)p.x·0 + p.z·b + p.y·a

The derivation is in the doc.

Callers 2

Callees 0

None by a direct call or jump.

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