benilla-re systems structs docs

DominantAxis

function · cmath · primitive

Address
0x7bf680 · 81 bytes, up to 0x7bf6d0
Signature
uint32_t __thiscall (NTempest::C3Vector *this)
Meaning
Returns the index of a vector's largest component by magnitude, a tie going to the later axis
Confidence
verified, proof two
Finding
cmath/geometry#dominant-axis-and-bounds
Test
cmath::dominant_axis_difftest, terrain::portal_screen_rect_difftest, models::aabsp_nearest_dist_difftest, models::wmo_mocv_barycentric_color_difftest

Finding: Dominant axis and bounds in cmath: intersections

0x7bf680 returns the index of the largest component of the vector in ecx by magnitude: 0 only when |x| is strictly greater than both |y| and |z|; otherwise 1 when |y| is strictly greater than |z|, else 2, so a tie goes to the later axis. 0x7c1450(n, points) writes the bounds of n points (stride 12) to the six floats at ecx, minimum then maximum; for n of 0 all six are 0. It starts from the first point and folds each next one with a per-axis compare, the maximum through 0x6992c0. 0x7c16b0 does the same for the points an index list names.

The derivation is in the doc.

Callers 7

Callees 0

None by a direct call or jump.

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