Enable hardware selection for vtkCellGrid
- This commit adds two new properties on
vtkSelectionNode
to indicate the cell type index that was picked in avtkCellGrid
and whether a cell or side was picked. - The
vtkDGRenderResponder
and it's OpenGL shaders encode various indices during the new picking passes into the framebuffer. - The hardware selector decodes the pixel information encoded by
vtkDGRenderResponder
in the framebuffer intovtkSelectionNode
objects. - The
vtkAreaPicker
,vtkRenderedAreaPicker
andvtkHardwarePicker
can now determine whether avtkDataObject
was picked. Earlier, it only recognized derived instances ofvtkDataSet
. This is required becausevtkCellGrid
directly inheritsvtkDataObject
. - The new
TestCellGridHardwarePicker.py
unit test verifies basic point and click selection usingvtkHardwarePicker
. It tests that the picker populates correct information in the different pick result indices. - The new
TestCellGridRenderedAreaPicker.py
unit test verifies rubberband selection usingvtkRenderedAreaPicker
. It tests that the picker populates correct values for the different information integer keys on selection nodes. - The new
TestCellGridRenderedAreaPickerWithPolyData.py
extends the selection to includevtkPolyData
in the same renderer used byvtkCellGrid
.
Edited by Jaswant Panchumarti (Kitware)