benilla-re systems structs docs

SetPlaneFromNormal

function · terrain · primitive

Address
0x6acde0 · 62 bytes, up to 0x6ace1d
Signature
void __thiscall (float *this, const float *normal, const float *point)
Meaning
Copies a normal into a plane and sets d to minus its dot with a point
Confidence
verified, proof one
Finding
terrain/collide#impassable-walls
Test
terrain::plane_from_np_difftest, terrain::impassable_chunk_fence_difftest

Finding: Impassable walls in terrain: collide

A chunk whose header flag bit 1 is set (0x40 in the runtime word +0xc, written once at 0x6af677) fences itself. For each side the query box crosses, 0x6ab530 adds a vertical quad of two facets along the chunk's own box. Min and max are chunk +0x44 to +0x4c and +0x50 to +0x58 (x, y, z); the quad rises 32000.0 from the chunk's lowest height C.minZ. The walls ignore the query's class mask, the flag is read once per chunk, and the chunk's own triangles are gathered as for any chunk.

sidetest (strict)start pedge enormal
y-minQ.min1 < C.min1(C.min0, C.min1, C.minZ)(+W, 0, 0)(0, −1, 0)
y-maxQ.max1 > C.max1(C.max0, C.max1, C.minZ)(−W, 0, 0)(0, 1, 0)
x-minQ.min0 < C.min0(C.min0, C.max1, C.minZ)(0, −D, 0)(−1, 0, 0)
x-maxQ.max0 > C.max0(C.max0, C.min1, C.minZ)(0, +D, 0)(1, 0, 0)

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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