19 #include <Inventor/nodes/SoCamera.h>
20 #include <Inventor/Qt/viewers/SoQtViewer.h>
68 std::cout<<
"IVP13DSystem::Imp::clickedoutside Error: Got null selection pointer!"<<std::endl;
73 std::cout<<
"IVP13DSystem::Imp::clickedoutside Error: Could not find system pointer!"<<std::endl;
98 std::cout<<
"IVP13DSystem::Imp::start_changeselection Error: Could not find selection pointer!"<<std::endl;
102 if (
selection->policy.getValue()==SoSelection::SINGLE)
107 std::cout<<
"IVP13DSystem::Imp::start_changeselection Error: Could not find system pointer!"<<std::endl;
125 std::cout<<
"IVP13DSystem::Imp::finished_changeselection Error: Could not find selection pointer!"<<std::endl;
131 std::cout<<
"IVP13DSystem::Imp::finished_changeselection Error: Could not find system pointer!"<<std::endl;
137 if (
selection->policy.getValue()==SoSelection::SINGLE)
142 std::cout<<
"IVP13DSystem::Imp::finished_changeselection Error: Could not find last selection path list!"<<std::endl;
147 bool changed =
false;
148 if (nlastselection!=
selection->getList()->getLength()) {
151 for (
int i = 0;
i <
selection->getList()->getLength(); ++
i) {
166 if (
selection->getList()->getLength()>nlastselection) {
173 QSet<SoNode*> selnodes;
174 QSet<SoPath*> selpaths;
176 for (
int i = 0;
i <
n; ++
i) {
180 SoFullPath *fPath =
static_cast<SoFullPath *
>(
path);
181 SoNode *
node = fPath->getTail();
194 SoFullPath *fPath =
static_cast<SoFullPath *
>(
path);
197 SoNode *selectedNode = fPath->getTail();
202 std::cout<<
"IVP13DSystem::Imp::made_selection Error: Could not find selection pointer!"<<std::endl;
205 if (
selection->policy.getValue()!=SoSelection::SINGLE)
209 std::cout <<
"IVP13DSystem::Imp::made_selection Error: Could not find system pointer!"<<std::endl;
229 SoFullPath *fPath =
static_cast<SoFullPath *
>(
path);
232 SoNode *deselectedNode = fPath->getTail();
238 std::cout<<
"IVP13DSystem::Imp::made_deselection Error: Could not find selection pointer!"<<std::endl;
241 if (
selection->policy.getValue()!=SoSelection::SINGLE)
245 std::cout <<
"IVP13DSystem::Imp::made_deselection Error: Could not find system pointer!"<<std::endl;
260 message(
"registerSelectionNode Error: NULL selection pointer!");
264 message(
"registerSelectionNode Error: Trying to register selection node more than once!");
284 message(
"unregisterSelectionNode Error: NULL selection pointer!");
288 message(
"registerSelectionNode Error: Trying to unregister unknown selection node!");
313 message(
"setUserSelectionNotificationsEnabled Error: NULL selection pointer!");
317 message(
"setUserSelectionNotificationsEnabled Error: Called for selection which was never registered!");
335 if (
it->second!=
this)
337 if (
it->first!=exception_sel) {
338 if (
it->first->policy.getValue()!=SoCooperativeSelection::SINGLE) {
340 it->first->deselectAll();
343 if (
it->first->getList()->getLength()==1) {
345 SoPath *
path =
static_cast<SoPath*
>(
it->first->getList()->get(0));
347 it->first->deselectAll();
371 std::set<SoCooperativeSelection*> sel2unregister;
374 if (
it->second ==
this)
375 sel2unregister.insert(
it->first);
378 for (itSel = sel2unregister.begin();itSel!=itSelE;++itSel) {
382 messageDebug(
"Unregistered all nodes. Unref all camera pointers...");
400 SoCamera*cam = (*it)->getCamera();
402 cameralist.insert(cam);