PickStaticMesh
function · gxumath · unreached
- Address
0x5c5bf0· 570 bytes, up to0x5c5e29- Meaning
- Stores the nearest triangle hit of a ray over a vertex array and its index
- Confidence
- verified, proof one
- Finding
- gxumath#mesh-ray-picks
Finding: Mesh ray picks in gxumath
0x5c5bf0 and 0x5c57a0 return 1 when a ray hits a triangle mesh and store the lowest hit t
and its triangle index. The static pick 0x5c5bf0 (ecx origin, edx direction; a count, the
vertices, the mode, the index count, the u16 indices and two outputs; ret 0x1c) walks the
triangles of mode 3 (list), 4 (strip) or 5 (fan around idx[0]) through 0x5c5560; the skinned pick
0x5c57a0 (ret 0x34) first blends each vertex from up to four bones, then keeps only t ≥ 0. A list
of n indices walks (n − 1)/3 + 1 triangles, so a count that is not a multiple of 3 reads past
the indices. Indices are not checked against the vertex count.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 2
- IntersectUnitRayTriangle gxumath
- SErrSetLastError storm
Calls and jumps by a bare address, from tables/calls.tsv.