[vtkusers] Merging selections
David Doria
daviddoria+vtk at gmail.com
Tue Mar 30 19:09:00 EDT 2010
If I do this:
vtkSmartPointer<vtkSelectionNode> selectionNode1 =
vtkSmartPointer<vtkSelectionNode>::New();
selectionNode1->SetFieldType(vtkSelectionNode::POINT);
selectionNode1->SetContentType(vtkSelectionNode::INDICES);
selectionNode1->SetSelectionList(ids1);
vtkSmartPointer<vtkSelectionNode> selectionNode2 =
vtkSmartPointer<vtkSelectionNode>::New();
selectionNode2->SetFieldType(vtkSelectionNode::POINT);
selectionNode2->SetContentType(vtkSelectionNode::INDICES);
selectionNode2->SetSelectionList(ids2);
vtkSmartPointer<vtkSelection> selection =
vtkSmartPointer<vtkSelection>::New();
selection->AddNode(selectionNode1);
selection->AddNode(selectionNode2);
followed by a vtkExtractSelection, shouldn't it extract everything
selected by both selections? (It doesn't work:
http://www.vtk.org/Wiki/VTK/Examples/MergeSelections)
What is the difference between doing the above and creating one
vtkSelection object, then calling Union() on a second vtkSelection?
Thanks,
David
More information about the vtkusers
mailing list