benilla-re systems structs docs

s_volumeBevelNormalZ

global · collision

Address
0x80dfe0 · 4 bytes, up to 0x80dfe3
Type
float
Meaning
Holds 0.4756366 (0x3ef386a4), cos 61.6°, the vertical part of the volume bevel normals
Confidence
verified, proof one
Finding
collision/contact#volume-planes

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.