GatherChunkFacets
function · terrain · primitive
- Address
0x6aadc0· 1821 bytes, up to0x6ab4dc- Signature
uint8_t __fastcall (int32_t column, int32_t row, const int32_t *cells, const float *box, void *list, uint32_t mask)- Meaning
- Gathers a chunk's cell triangles in a box with their planes, its walls, liquid and doodads
- Confidence
- verified, proof one
- Finding
- terrain/collide#chunk-facets
- Test
terrain::chunk_gather_aabb_difftest,terrain::chunk_gather_aabb_nonzero_origin_difftest
Finding: Chunk facets in terrain: collide
0x6aadc0 gathers a chunk's facets: four triangles per cell of the rectangle clamped to the
chunk, skipping holes, from its inner vertex C and corners V, V+1, V+17 and V+18 as (V+17, C, V),
(C, V+1, V), (C, V+17, V+18) and (C, V+18, V+1). A triangle is kept unless one face of the box,
grown by 0.019444443 and taken relative to the chunk, has all three vertices outside. The
vertices are stored as chunk vertex plus position. It also adds an impassable chunk's walls, the
liquid slots' facets and the doodads' and entities' by the mask.
The derivation is in the doc.
Callers 1
- GatherWorldFacets terrain
Callees 16
- 0x404130 client
- AddVector3InPlace ui
- SetPlane gx
- ResizeGuidArray objectlayer
- PlaneFromTriangle collision
- ConstructFacet terrain
- GrowFacetArray terrain
- ClampHashCapacity32 terrain
- DrawPortalQuad terrain
- GatherLiquidFacets terrain
- CMapChunk::AddImpassableWalls terrain
- GatherDoodadFacets terrain
- GatherEntityFacets terrain
- RoundUpToMultipleC terrain
- SetColor terrain
- FillPlaneRecordWithScalar cmath
Calls and jumps by a bare address, from tables/calls.tsv.