本文整理汇总了C++中scene::INodePtr::isRoot方法的典型用法代码示例。如果您正苦于以下问题:C++ INodePtr::isRoot方法的具体用法?C++ INodePtr::isRoot怎么用?C++ INodePtr::isRoot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scene::INodePtr
的用法示例。
在下文中一共展示了INodePtr::isRoot方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: pre
bool pre(const scene::INodePtr& node)
{
// Don't clone root items
if (node->isRoot())
{
return true;
}
if (Node_isSelected(node))
{
// Don't traverse children of cloned nodes
return false;
}
return true;
}
示例2: post
void post(const scene::INodePtr& node)
{
if (node->isRoot())
{
return;
}
if (Node_isSelected(node))
{
// Clone the current node
scene::INodePtr clone = map::Node_Clone(node);
// Add the cloned node and its parent to the list
_cloned.insert(Map::value_type(clone, node->getParent()));
// Insert this node in the root
_cloneRoot->addChildNode(clone);
}
}
示例3: pre
bool pre(const scene::INodePtr& node)
{
// Check the selection status
bool isSelected = Node_isSelected(node);
// greebo: Don't check root nodes for selected state
if (!node->isRoot() && isSelected)
{
// We have a selected instance, "remember" this by setting the parent
// stack element to TRUE
if (!_stack.empty())
{
_stack.top() = true;
}
}
// We are going one level deeper, add a new stack element for this subtree
_stack.push(false);
// Try to go deeper, but don't do this for deselected instances
return !isSelected;
}