benilla-re systems structs docs

FlushTriangleBatchFacets

function · terrain · primitive

Address
0x671cc0 · 1064 bytes, up to 0x6720e7
Signature
void __fastcall (uint32_t unused, void *owner, uint32_t arg3, uint32_t arg4)
Meaning
Turns the recorded triangle batches into facet records with planes and owners
Confidence
verified, proof one
Finding
terrain/collide#batch-flush
Test
terrain::liquid_hit_flush_difftest

Finding: Batch flush in terrain: collide

0x671cc0(list, owner) (ecx unused, owner two words on the stack) appends one facet per triangle of every batch to the list, in batch order. The vertices are the batch's, moved by its matrix. The normal is (v1 − v0) × (v2 − v0) normalized, d = −n·v0. Every new facet gets the owner pair, and the list's owner array is grown and counted to match.

The derivation is in the doc.

Callers 6

Callees 13

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