| 80 | |
| 81 | template <typename _ValueType> |
| 82 | bool RawTrack<_ValueType>::Validate() const { |
| 83 | float previous_ratio = -1.f; |
| 84 | for (size_t k = 0; k < keyframes.size(); ++k) { |
| 85 | const float frame_ratio = keyframes[k].ratio; |
| 86 | // Tests frame's ratio is in range [0:1]. |
| 87 | if (frame_ratio < 0.f || frame_ratio > 1.f) { |
| 88 | return false; |
| 89 | } |
| 90 | // Tests that frames are sorted. |
| 91 | if (frame_ratio <= previous_ratio) { |
| 92 | return false; |
| 93 | } |
| 94 | previous_ratio = frame_ratio; |
| 95 | } |
| 96 | return true; // Validated. |
| 97 | } |
| 98 | |
| 99 | template <typename _ValueType> |
| 100 | void RawTrack<_ValueType>::Save(io::OArchive& _archive) const { |
no test coverage detected