benilla-re systems structs docs

ClassifyPointAgainstBox

function · cmath · unreached

Address
0x7c1dd0 · 601 bytes, up to 0x7c2028
Meaning
Tests a point and radius against a box in one of four modes
Confidence
inferred
Finding
cmath/geometry#circle-and-point-against-a-box

Finding: Circle and point against a box in cmath: intersections

0x7c2040(mode) tests the circle or sphere in edx (centre x and y at +0 and +4, radius at +0xc) against the box in ecx on the first two axes and returns a byte, with r² the rounded squared radius. Per axis dmin and dmax are the squared distances to the two faces; near sums dmin for a centre below the minimum and dmax above the maximum, and far sums the larger of the two. Mode 3 is true when near≤r², and mode 2 when also r²≤far. Mode 1 needs near≤r² and a hit flag, mode 0 the flag, near≤r² and r²≤far. A mode above 3 returns 0.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 0

None by a direct call or jump.

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