(float time)
| 48 | } |
| 49 | |
| 50 | T Sample(float time) |
| 51 | { |
| 52 | if (time <= _frames[0].time) |
| 53 | return _frames[0].data; |
| 54 | if (time >= _frames[_frames.Length - 1].time) |
| 55 | return _frames[_frames.Length - 1].data; |
| 56 | |
| 57 | int item = Array.BinarySearch(_frames, (time,default(T)), _comparer); |
| 58 | if (item > 0) |
| 59 | return _frames[item].data; |
| 60 | else |
| 61 | { |
| 62 | item = ~item; |
| 63 | var p1 = _frames[item - 1]; |
| 64 | var p2 = _frames[item]; |
| 65 | float pct = (time - p1.time) / (p2.time - p1.time); |
| 66 | return _lerp(p1.data, p2.data, pct); |
| 67 | } |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | class DebugToolWindow : IStepper |
nothing calls this directly
no outgoing calls
no test coverage detected