M2SampleFloatTrack
function · models · primitive
- Address
0x71af20· 199 bytes, up to0x71afe6- Meaning
- Samples a float track at a bone's times, blending toward the blend slot's value
- Confidence
- verified, proof one
- Finding
- models/animation#key-lookup
- Test
animation::m2_animate_difftest,animation::m2_track_sample_float_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 1
- CM2Model::FindKey models
Calls and jumps by a bare address, from tables/calls.tsv.