add method to get view that contains a given node

This commit is contained in:
wmayer
2016-08-14 18:01:10 +02:00
parent 279531e89d
commit 554875b930
6 changed files with 31 additions and 7 deletions

View File

@@ -600,6 +600,16 @@ void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCalle
}
/// @endcond
SbBool View3DInventorViewer::searchNode(SoNode* node) const
{
SoSearchAction searchAction;
searchAction.setNode(node);
searchAction.setInterest(SoSearchAction::FIRST);
searchAction.apply(this->getSceneGraph());
SoPath* selectionPath = searchAction.getPath();
return selectionPath ? true : false;
}
SbBool View3DInventorViewer::hasViewProvider(ViewProvider* pcProvider) const
{
return _ViewProviderSet.find(pcProvider) != _ViewProviderSet.end();