benilla-re systems structs docs

s_pickBufferFlags

global · gxumath

Address
0xc2b854 · 1 bytes, up to 0xc2b854
Type
uint8_t
Meaning
Holds bit 0 set once the skinned pick has set up its scratch buffer
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.