benilla-re systems structs docs

CullExteriorMapObjects

function · terrain · primitive

Address
0x6856c0 · 965 bytes, up to 0x685a84
Signature
void __fastcall (void *list, uint32_t arg2)
Meaning
Culls the map objects seen from outside and seeds their visible groups
Confidence
inferred
Finding
terrain/scene#exterior-map-objects
Test
terrain::wmo_corner_ray_negate_difftest, terrain::wmo_dir_len2_gate_difftest, terrain::wmo_dir_normalize_difftest, terrain::wmo_plane_offset_negate_difftest

Finding: Exterior map objects in terrain: scene

0x6856c0 runs on a band's map object defs, for the rectangle edx. A def whose box at +0x44 is inside the frustum and not hidden by the horizon (flags 1) gets the camera's position and a far point moved into its space, and their unit direction and plane offset stored as the cull ray. It sets the group callback 0x685d70 through 0x6b3880, seeds its exterior groups with 0x6b3dd0, and unlinks the def from the band. 0x685d70 runs per group: it links the group to the frame's group list with a copy of the current frustum volume, and culls the group's doodad defs (0x6838f0, when any bit of 0x400081 is set in the world flags) and entities (0x6834e0).

The derivation is in the doc.

Callers 1

Callees 13

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