benilla-re systems structs docs

DoesSegmentCrossTriangle2D

function · cmath · unreached

Address
0x7c4030 · 90 bytes, up to 0x7c4089
Meaning
Returns 1 when a 2D segment crosses an edge of a triangle
Confidence
inferred
Finding
cmath/geometry#triangles-in-the-plane

Finding: Triangles in the plane in cmath: intersections

0x7c3e30 takes two plane records with three vertices each (normal at +0, constant at +0xc, vertices at +0x10, +0x1c and +0x28) and answers whether the triangles overlap. It classes the three vertices of the record in edx against the plane of the one in ecx (bounds at 0x8029d0 and 0x810ccc), and when all three lie in the plane calls 0x7c4150. 0x7c4150 projects both triangles onto the two axes other than the dominant axis of the first normal (a tie goes to the later axis) and returns 1 when an edge of one meets the other (0x7c4030) or a vertex of one lies in the other (0x7c4090).

The derivation is in the doc.

Callers 2

Callees 1

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