vtkVisibleCellSelector

Section: Visualization Toolkit Rendering Classes

Usage

DEPRECATED: Please refer to vtkHardwareSelector instead. This class can be used to determine what cells are visible within a given rectangle of the RenderWindow. To use it, call in order, SetRenderer(), SetArea(), SetProcessorId(), SetRenderPasses(), and then Select(). Select will cause the attached vtkRenderer to render in a special color mode, where each cell is given it own color so that later inspection of the Rendered Pixels can determine what cells are visible. In practice up to five different rendering passes may occur depending on your choices in SetRenderPasses. After Select(), a list of the visible cells can be obtained by calling GetSelectedIds().

Limitations: Antialiasing will break this class. If your graphics card settings force their use this class will return invalid results.

Currently only cells from PolyDataMappers can be selected from. When vtkRenderer is put into a SelectMode, it temporarily swaps in a new vtkIdentColoredPainter to do the color index rendering of each cell in each vtkProp that it renders. Until alternatives to vtkIdentColoredPainter exist that can do a similar coloration of other vtkDataSet types, only polygonal data can be selected. If you need to select other data types, consider using vtkDataSetMapper and turning on it's PassThroughCellIds feature, or using vtkFrustumExtractor.

Only Opaque geometry in Actors is selected from. Assemblies and LODMappers are not currently supported.

During selection, visible datasets that can not be selected from are temporarily hidden so as not to produce invalid indices from their colors.

To create an instance of class vtkVisibleCellSelector, simply invoke its constructor as follows

  obj = vtkVisibleCellSelector

Methods

The class vtkVisibleCellSelector has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj is an instance of the vtkVisibleCellSelector class.