void DiCullNode::FlipVisibility( bool cascade /*= true*/ ) { for (auto oi = mObjects.begin(); oi != mObjects.end(); ++oi) { (*oi)->SetVisible(!(*oi)->GetVisible()); } if (cascade) { for (size_t i = 0; i < mChildren.size(); ++i) { DiCullNode* sceneChild = static_cast<DiCullNode*>(mChildren[i]); sceneChild->FlipVisibility(cascade); } } }
void DiCullNode::FlipVisibility( bool cascade /*= true*/ ) { ObjectMap::iterator oi, oiend; oiend = mObjectsByName.end(); for (oi = mObjectsByName.begin(); oi != oiend; ++oi) { oi->second->SetVisible(!oi->second->GetVisible()); } if (cascade) { for (size_t i = 0; i < mChildren.size(); ++i) { DiCullNode* sceneChild = static_cast<DiCullNode*>(mChildren[i]); sceneChild->FlipVisibility(cascade); } } }