MinVector3
function · terrain · primitive
- Address
0x699250· 98 bytes, up to0x6992b1- Signature
float * __fastcall (float *out, const float *a, const float *b)- Meaning
- Writes the per-component minimum of two vectors, taking b on a tie or a NaN
- Confidence
- verified, proof one
- Finding
- terrain/chunk#chunk-vertices
- Test
terrain::vec3_min
Finding: Chunk vertices in terrain: chunk
CMapChunk::BuildVertices (0x6b0e50) writes 145 vertices relative to the chunk position: nine
rows of nine outer vertices, each but the last followed by eight inner ones. With g the chunk's
global row (+0x90) and h its global column (+0x8c), and every step stored as a float,
o(n) = 17066.666 − n·33.333332, sx = −(o(g) − o(g+1))/8, sy = −(o(h) − o(h+1))/8.
Outer vertex (j, i) is (j·sx, i·sy, z); inner vertex (j, i) is (j·sx + sx/2, i·sy + sy/2, z), with z the next MCVT float copied unchanged. The box is the vertices' minimum and maximum plus the position; the centre is (min + max)/2 and the radius |max − centre|.
The derivation is in the doc.
Callers 3
- PropagateLinkBounds terrain
- CMapChunk::BuildVertices terrain
- DrawBlobShadow lighting
Callees 0
None by a direct call or jump.
Calls and jumps by a bare address, from tables/calls.tsv.