BuildMirroredLookAtMatrix
function · gxumath · unreached
- Address
0x5c4100· 648 bytes, up to0x5c4387- Signature
void __fastcall (const float *eye, const float *target, const float *up, float *out)- Meaning
- Writes the view matrix of 0x5c3e70 with its first row negated
- Confidence
- verified, proof one
- Finding
- gxumath#look-at-matrices
Finding: Look-at matrices in gxumath
0x5c3e70 (ecx the eye, edx the target; the up vector and the output on the stack; ret 8)
writes a view matrix. With f = normalize(target − eye), s = normalize(f × up) and u = s × f:
m0 m4 m8 is s, m1 m5 m9 is u, m2 m6 m10 is f, m3 m7 m11 are 0 and m15 is 1. m12 m13 m14 is the eye negated through 0x7bdc40; m12 = (−e.z·m8 + −e.y·m4 + −e.x·m0) + 0. It fails when
|target − eye|² or |up|² is under 0.01. 0x5c4100, which no code calls, uses s' = up × f and
u' = f × s', which negates m0 m4 m8 and m12.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 3
- SetVector3 spline
- SErrSetLastError storm
- TranslateMatrix cmath
Calls and jumps by a bare address, from tables/calls.tsv.