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