FlushTriangleBatchFacets
function · terrain · primitive
- Address
0x671cc0· 1064 bytes, up to0x6720e7- 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
- GatherMapObjectFacets terrain
- GatherLiquidFacets terrain
- GatherLiquidVolumeFacets terrain
- GatherMapObjectVolumeFacets terrain
- CMapObjGroup::QueryLiquidSegment models
- CMapObjGroup::QueryLiquidVolume models
Callees 13
- SetVector3 spline
- SubtractVector3 ui
- 0x5138b0 unassigned
- DotVector3 objectlayer
- ResizeGuidArray objectlayer
- NormalizeVector3 terrain
- CrossVector3 terrain
- ConstructFacet terrain
- GrowFacetArray terrain
- ClampHashCapacity terrain
- RoundUpToMultipleG terrain
- ClampHashCapacity32 terrain
- TransformPoint cmath
Calls and jumps by a bare address, from tables/calls.tsv.