| 71 | } |
| 72 | |
| 73 | const BenchmarkSequence::KeyFrame BenchmarkSequence::GetNextKeyFrame(float time) const |
| 74 | { |
| 75 | for (int i = 0; i < m_keyFrames.size(); i++) |
| 76 | { |
| 77 | const KeyFrame& key = m_keyFrames[i]; |
| 78 | if (key.m_time >= time) |
| 79 | { |
| 80 | return key; |
| 81 | } |
| 82 | } |
| 83 | |
| 84 | // key frame not found, return empty |
| 85 | KeyFrame invalidKey = KeyFrame{ 0 }; |
| 86 | invalidKey.m_time = -1.0f; |
| 87 | return invalidKey; |
| 88 | } |