| 767 | } |
| 768 | |
| 769 | bool |
| 770 | Curve::getKeyFrameWithTime(double time, |
| 771 | KeyFrame* k) const |
| 772 | { |
| 773 | assert(k); |
| 774 | QMutexLocker l(&_imp->_lock); |
| 775 | KeyFrameSet::const_iterator it = find(time); |
| 776 | |
| 777 | if ( it == _imp->keyFrames.end() ) { |
| 778 | return false; |
| 779 | } |
| 780 | |
| 781 | *k = *it; |
| 782 | |
| 783 | return true; |
| 784 | } |
| 785 | |
| 786 | /// compute interpolation parameters from keyframes and an iterator |
| 787 | /// to the next keyframe (the first with time > t) |
no test coverage detected