本文整理汇总了C++中KeyFrameSet::rend方法的典型用法代码示例。如果您正苦于以下问题:C++ KeyFrameSet::rend方法的具体用法?C++ KeyFrameSet::rend怎么用?C++ KeyFrameSet::rend使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KeyFrameSet
的用法示例。
在下文中一共展示了KeyFrameSet::rend方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DimIdx
static void
deleteKnobAnimation(const std::set<double>& userKeyframes,
const KnobIPtr& knob,
DeleteKnobAnimationEnum type,
double currentTime)
{
for (int i = 0; i < knob->getNDimensions(); ++i) {
CurvePtr curve = knob->getAnimationCurve(ViewIdx(0), DimIdx(i));
assert(curve);
KeyFrameSet keys = curve->getKeyFrames_mt_safe();
std::list<double> toRemove;
switch (type) {
case eDeleteKnobAnimationAll: {
for (KeyFrameSet::iterator it = keys.begin(); it != keys.end(); ++it) {
std::set<double>::iterator found = userKeyframes.find( it->getTime() );
if ( found == userKeyframes.end() ) {
toRemove.push_back( it->getTime() );
}
}
break;
}
case eDeleteKnobAnimationBeforeTime: {
for (KeyFrameSet::iterator it = keys.begin(); it != keys.end(); ++it) {
if (it->getTime() >= currentTime) {
break;
}
std::set<double>::iterator found = userKeyframes.find( it->getTime() );
if ( found == userKeyframes.end() ) {
toRemove.push_back( it->getTime() );
}
}
break;
}
case eDeleteKnobAnimationAfterTime: {
for (KeyFrameSet::reverse_iterator it = keys.rbegin(); it != keys.rend(); ++it) {
if (it->getTime() <= currentTime) {
break;
}
std::set<double>::iterator found = userKeyframes.find( it->getTime() );
if ( found == userKeyframes.end() ) {
toRemove.push_back( it->getTime() );
}
}
break;
}
}
knob->deleteValuesAtTime(toRemove, ViewSetSpec::all(), DimIdx(i), eValueChangedReasonUserEdited);
}
}