| 740 | } |
| 741 | |
| 742 | int |
| 743 | Curve::getNKeyFramesInRange(double first, |
| 744 | double last) const |
| 745 | { |
| 746 | int ret = 0; |
| 747 | QMutexLocker k(&_imp->_lock); |
| 748 | KeyFrameSet::const_iterator upper = _imp->keyFrames.end(); |
| 749 | |
| 750 | for (KeyFrameSet::const_iterator it = _imp->keyFrames.begin(); it != _imp->keyFrames.end(); ++it) { |
| 751 | if (it->getTime() >= first) { |
| 752 | upper = it; |
| 753 | break; |
| 754 | } |
| 755 | } |
| 756 | for (; upper != _imp->keyFrames.end(); ++upper) { |
| 757 | if (upper->getTime() >= last) { |
| 758 | break; |
| 759 | } |
| 760 | ++ret; |
| 761 | } |
| 762 | |
| 763 | return ret; |
| 764 | } |
| 765 | |
| 766 | bool |
| 767 | Curve::getKeyFrameWithTime(double time, |
no test coverage detected