本文整理汇总了C++中SoState::getDepth方法的典型用法代码示例。如果您正苦于以下问题:C++ SoState::getDepth方法的具体用法?C++ SoState::getDepth怎么用?C++ SoState::getDepth使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SoState
的用法示例。
在下文中一共展示了SoState::getDepth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
// private convenience method
void
SoFCSelection::turnoffcurrent(SoAction * action)
{
#ifdef NO_FRONTBUFFER
if (SoFCSelection::currenthighlight &&
SoFCSelection::currenthighlight->getLength()) {
SoNode * tail = SoFCSelection::currenthighlight->getTail();
if (tail->isOfType(SoFCSelection::getClassTypeId())) {
((SoFCSelection*)tail)->highlighted = FALSE;
((SoFCSelection*)tail)->touch(); // force scene redraw
if (action) ((SoFCSelection*)tail)->redrawHighlighted(action, FALSE);
}
}
if (SoFCSelection::currenthighlight) {
SoFCSelection::currenthighlight->unref();
SoFCSelection::currenthighlight = NULL;
}
#else
if (currenthighlight == NULL)
return;
SoNode *tail = currenthighlight->getTail();
if (tail->isOfType(SoFCSelection::getClassTypeId())) {
// don't redraw if we already are in the middle of rendering
// (processing events during render abort might cause this)
SoState *state = action->getState();
if (state && state->getDepth() == 1)
((SoFCSelection *)tail)->redrawHighlighted(action, FALSE);
}
else {
// Just get rid of the path. It's no longer valid for redraw.
currenthighlight->unref();
currenthighlight = NULL;
}
#endif
}