I am working on a viewer for subsurface data (geology). In the app, users can load grids and plot data on the grids.
They can zoom in so that only a small part of the grid is visible in the rendering window.
I would like some way to get (an approximation of) the area currently visible in the window so that I can make a color mapping for the range of data currently visible.
I have tried using vtkCellPicker to get cell id’s on many screen pixel coordinates. That works, but the performance is not good.
Any ideas how this can be done faster?
Thanks in advance!
Take a look at this example: https://github.com/Kitware/VTK/blob/master/Rendering/Core/Testing/Cxx/FrustumClip.cxx . Alternativelly, check the
vtkExtractSelectedFrustum class: https://vtk.org/doc/nightly/html/classvtkExtractSelectedFrustum.html .
thanks! this puts me on the right track.