M2SampleRotation
function · models · primitive
- Address
0x713ea0· 337 bytes, up to0x713ff0- Meaning
- Samples a rotation track at a bone's times, blending toward the blend slot's rotation
- Confidence
- verified, proof one
- Finding
- models/animation#key-lookup
- Test
animation::m2_animate_difftest,animation::m2_track_sample_quat_difftest
Finding: Key lookup in models: animation
FindKey(time, range, track) finds the key pair around a time. The range is the track's range
for the sequence, or all keys; a global-sequence track uses its global time instead. It starts
from the last key found: within 500 ms forward it steps forward, within 500 ms back it steps back;
otherwise it steps forward from the range's first key when t is within 500 ms of it, and else
binary-searches. The fraction is (t − t0) / (t1 − t0) from a 64-bit unsigned numerator over a
signed 32-bit denominator, rounded to a float. Only the track's last key gives fraction 0; at a
range's last key the pair runs into the next range's first key.
The derivation is in the doc.
Callers 1
- CM2Model::Animate models
Callees 2
- CM2Model::FindKey models
- BlendQuaternionDispatch d3dx
Calls and jumps by a bare address, from tables/calls.tsv.