benilla-re systems structs docs

MatrixFromQuaternionDispatch

function · d3dx

Address
0x74b6b5 · 6 bytes, up to 0x74b6ba
Meaning
Jumps through a pointer to the quaternion-to-matrix routine
Confidence
verified, proof one
Finding
animation/pose#rotation-leg
Test
animation::m2_animate_difftest

Finding: Rotation leg in animation: bone matrices

With a rotation key count [bone+0x34] of 0 the local matrix is the identity. Otherwise, when the count exceeds the first-update gate, the leg samples the rotation track [bone+0x28] into the state at +0x30 (quaternion at +0x3c, tracks). Then, with the sample just taken or the one stored, it builds the matrix from the quaternion (x, y, z, w) by 0x74b6b5(out, q): row 0 is (1 − 2yy − 2zz, 2xy + 2zw, 2xz − 2yw, 0), row 1 (2xy − 2zw, 1 − 2xx − 2zz, 2yz + 2xw, 0), row 2 (2xz + 2yw, 2yz − 2xw, 1 − 2xx − 2yy, 0) and row 3 (0, 0, 0, 1).

The derivation is in the doc.

Callers 4

Callees 0

None by a direct call or jump.

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