17 #include <vtkRenderWindow.h>
53 this->optionChangedSlot();
60 void ViewGroup::optionChangedSlot()
69 wrapper->setSharedOpenGLContext(sharedOpenGLContext);
70 mViews.push_back(wrapper->getView());
77 View* view = wrapper->getView().get();
89 View* view = wrapper->getView().get();
118 if(shouldUpdateActiveData(activeData->getActive<
Mesh>(), meshes))
119 activeData->setActive(meshes.front()->getUid());
120 if(shouldUpdateActiveData(activeData->getActive<
Image>(), images))
121 activeData->setActive(images.front()->getUid());
122 if(shouldUpdateActiveData(activeData->getActive<
TrackedStream>(), trackedStreams))
123 activeData->setActive(trackedStreams.front()->getUid());
125 View* view =
static_cast<View*
>(this->sender());
131 bool ViewGroup::shouldUpdateActiveData(T activeData, std::vector<T> datas)
const
133 bool activeDataExistsInGroup = std::find(datas.begin(), datas.end(), activeData) != datas.end();
134 return !activeDataExistsInGroup && !datas.empty();
164 for (
unsigned j = 0; j <
mViews.size(); ++j)