benilla-re systems structs docs

InitPolygonAxisPairs

function · cmath · orchestration

Address
0x7c18d0 · 45 bytes, up to 0x7c18fc
Meaning
Stores the kept axis pairs of the point in polygon test
Confidence
verified, proof two
Finding
cmath/geometry#point-in-polygon

Finding: Point in polygon in cmath: intersections

0x7c23e0(n, axis) tests the point in ecx against n vertices (flat floats, stride 12, in edx) by the crossing count after dropping coordinate axis: the two kept coordinates are A = tab[axis].a and B = tab[axis].b from the table 0xcf5c7c, set by the initializer 0x7c18d0 to (2, 1) for axis 0, (0, 2) for axis 1 and (1, 0) for axis 2. For each edge from the previous vertex (the last for the first) to the current, with side(V) = V.A ≥ Q.A (false for NaN): a change of side compares (Vprev.B − Vcur.B)·(Vcur.A − Q.A) with (Vcur.B − Q.B)·(Vprev.A − Vcur.A), and the accumulator toggles when term2 ≤ term1 equals the current side. n of 0 gives 0.

The derivation is in the doc.

Callers 1

Callees 0

None by a direct call or jump.

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