I'm trying to use SoExtSelection to pick all vertices under a specific
rectangle...I use the select(...)-function and then try to receive a
pathlist with getSelectionPathList(), but the length of this pathlist
is always 0...
I use QT for drawing the rectangle. In the do***entation there is no
hint about the lassoCoords...How must the lassoCoords be like?
PixelPositions? What are the device coordinates of a rectangle? I
tried the pixels, the normalized pixels and world coordinates, but I
never got a path...
Here is a small code snippet:
SoExtSelection *selection = new SoExtSelection;
selection->lassoType.setValue(SoExtSelection::RECTANGLE);
selection->lassoPolicy.setValue(SoExtSelection::PART);
selection->lassoMode.setValue(SoExtSelection::VISIBLE_SHAPES);
selection->setPointFilterCallback (Selection::mySelectionCB, this);
SoGroup* root= m_viewer->getSceneRoot ();
selection->select (root, numCorners, lassoCoords2, view****t, false);
const SoPathList &pathlist = selection->getSelectionPathList();
cout << "Pathlist length = " << pathlist.getLength() << endl;
// (numCorners = 4, lassoCoords is SbVec2f* with 4 pairs, view****t is
ok, too)
Thanks for helping me...
Uwe


|