|
virtual int | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkHardwareSelector * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual void | SetRenderer (vtkRenderer *) |
| Get/Set the renderer to perform the selection on. More...
|
|
virtual vtkRenderer * | GetRenderer () |
|
virtual void | SetArea (unsigned int, unsigned int, unsigned int, unsigned int) |
| Get/Set the area to select as (xmin, ymin, xmax, ymax). More...
|
|
virtual void | SetArea (unsigned int[4]) |
|
virtual unsigned int * | GetArea () |
|
virtual void | GetArea (unsigned int &, unsigned int &, unsigned int &, unsigned int &) |
|
virtual void | GetArea (unsigned int[4]) |
|
virtual void | SetFieldAssociation (int) |
| Set the field type to select. More...
|
|
virtual int | GetFieldAssociation () |
|
virtual void | SetUseProcessIdFromData (bool) |
| In some parallel rendering setups, the process id for elements must be obtained from the data itself, rather than the rendering process' id. More...
|
|
virtual bool | GetUseProcessIdFromData () |
|
vtkSelection * | Select () |
| Perform the selection. More...
|
|
virtual bool | CaptureBuffers () |
| It is possible to use the vtkHardwareSelector for a custom picking. More...
|
|
PixelInformation | GetPixelInformation (const unsigned int display_position[2]) |
|
PixelInformation | GetPixelInformation (const unsigned int display_position[2], int maxDist) |
|
PixelInformation | GetPixelInformation (const unsigned int display_position[2], int maxDist, unsigned int selected_position[2]) |
|
void | ClearBuffers () |
|
virtual void | RenderCompositeIndex (unsigned int index) |
| Called by any vtkMapper or vtkProp subclass to render a composite-index. More...
|
|
virtual void | RenderAttributeId (vtkIdType attribid) |
| Called by any vtkMapper or vtkProp subclass to render an attribute's id. More...
|
|
virtual void | RenderProcessId (unsigned int processid) |
| Called by any vtkMapper or subclass to render process id. More...
|
|
int | Render (vtkRenderer *renderer, vtkProp **propArray, int propArrayCount) |
| Called by vtkRenderer to render the selection pass. More...
|
|
virtual void | BeginRenderProp () |
| Called by the mapper (vtkHardwareSelectionPolyDataPainter) before and after rendering each prop. More...
|
|
virtual void | EndRenderProp () |
|
virtual void | SetProcessID (int) |
| Get/Set the process id. More...
|
|
virtual int | GetProcessID () |
|
virtual float * | GetPropColorValue () |
| Get/Set the color to be used by the prop when drawing. More...
|
|
virtual void | GetPropColorValue (float &, float &, float &) |
|
virtual void | GetPropColorValue (float[3]) |
|
virtual void | SetPropColorValue (float, float, float) |
|
virtual void | SetPropColorValue (float[3]) |
|
virtual int | GetCurrentPass () |
| Get the current pass number. More...
|
|
virtual vtkSelection * | GenerateSelection () |
| Generates the vtkSelection from pixel buffers. More...
|
|
virtual vtkSelection * | GenerateSelection (unsigned int r[4]) |
|
virtual vtkSelection * | GenerateSelection (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2) |
|
virtual vtkSelection * | GeneratePolygonSelection (int *polygonPoints, vtkIdType count) |
| Generates the vtkSelection from pixel buffers. More...
|
|
vtkProp * | GetPropFromID (int id) |
| returns the prop associated with a ID. More...
|
|
std::string | PassTypeToString (PassTypes type) |
| Convert a PassTypes enum value to a human readable string. More...
|
|
| vtkBaseTypeMacro (vtkObject, vtkObjectBase) |
|
virtual void | DebugOn () |
| Turn debugging output on. More...
|
|
virtual void | DebugOff () |
| Turn debugging output off. More...
|
|
bool | GetDebug () |
| Get the value of the debug flag. More...
|
|
void | SetDebug (bool debugFlag) |
| Set the value of the debug flag. More...
|
|
virtual void | Modified () |
| Update the modification time for this object. More...
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time. More...
|
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
|
vtkCommand * | GetCommand (unsigned long tag) |
|
void | RemoveObserver (vtkCommand *) |
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
|
void | RemoveObservers (const char *event, vtkCommand *) |
|
int | HasObserver (unsigned long event, vtkCommand *) |
|
int | HasObserver (const char *event, vtkCommand *) |
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
int | HasObserver (unsigned long event) |
|
int | HasObserver (const char *event) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Allow user to set the AbortFlagOn() with the return value of the callback method. More...
|
|
int | InvokeEvent (unsigned long event, void *callData) |
| This method invokes an event and return whether the event was aborted or not. More...
|
|
int | InvokeEvent (const char *event, void *callData) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
const char * | GetClassName () const |
| Return the class name as a string. More...
|
|
virtual void | Delete () |
| Delete a VTK object. More...
|
|
virtual void | FastDelete () |
| Delete a reference to this object. More...
|
|
void | InitializeObjectBase () |
|
void | Print (ostream &os) |
| Print an object to an ostream. More...
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
|
virtual void | Register (vtkObjectBase *o) |
| Increase the reference count (mark as used by another object). More...
|
|
virtual void | UnRegister (vtkObjectBase *o) |
| Decrease the reference count (release by another object). More...
|
|
int | GetReferenceCount () |
| Return the current reference count of this object. More...
|
|
void | SetReferenceCount (int) |
| Sets the reference count. More...
|
|
void | PrintRevisions (ostream &) |
| Legacy. More...
|
|
|
virtual vtkObjectBase * | NewInstanceInternal () const |
|
| vtkHardwareSelector () |
|
| ~vtkHardwareSelector () |
|
virtual void | PreCapturePass (int pass) |
|
virtual void | PostCapturePass (int pass) |
|
virtual void | BeginRenderProp (vtkRenderWindow *)=0 |
|
virtual void | EndRenderProp (vtkRenderWindow *)=0 |
|
int | Convert (unsigned long offset, unsigned char *pb) |
|
int | Convert (unsigned int pos[2], unsigned char *pb) |
| pos must be relative to the lower-left corner of this->Area. More...
|
|
int | Convert (int xx, int yy, unsigned char *pb) |
|
vtkIdType | GetID (int low24, int mid24, int high16) |
|
virtual bool | PassRequired (int pass) |
| Returns is the pass indicated is needed. More...
|
|
bool | IsPropHit (int propid) |
| After the ACTOR_PASS this return true or false depending upon whether the prop was hit in the ACTOR_PASS. More...
|
|
virtual int | GetPropID (int idx, vtkProp *vtkNotUsed(prop)) |
| Return a unique ID for the prop. More...
|
|
virtual void | BeginSelection () |
|
virtual void | EndSelection () |
|
virtual void | SavePixelBuffer (int passNo) |
|
void | BuildPropHitList (unsigned char *rgbData) |
|
void | ReleasePixBuffers () |
| Clears all pixel buffers. More...
|
|
| vtkObject () |
|
| ~vtkObject () override |
|
void | RegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
|
void | UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override |
|
void | InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL) |
| These methods allow a command to exclusively grab all events. More...
|
|
void | InternalReleaseFocus () |
|
| vtkObjectBase () |
|
virtual | ~vtkObjectBase () |
|
virtual void | CollectRevisions (ostream &) |
|
virtual void | ReportReferences (vtkGarbageCollector *) |
|
| vtkObjectBase (const vtkObjectBase &) |
|
void | operator= (const vtkObjectBase &) |
|
manager for OpenGL-based selection.
vtkHardwareSelector is a helper that orchestrates color buffer based selection. This relies on OpenGL. vtkHardwareSelector can be used to select visible cells or points within a given rectangle of the RenderWindow. To use it, call in order:
- SetRenderer() - to select the renderer in which we want to select the cells/points.
- SetArea() - to set the rectangular region in the render window to select in.
- SetFieldAssociation() - to select the attribute to select i.e. cells/points etc.
- Finally, call Select(). Select will cause the attached vtkRenderer to render in a special color mode, where each cell/point is given it own color so that later inspection of the Rendered Pixels can determine what cells are visible. Select() returns a new vtkSelection instance with the cells/points selected.
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::Selector is non-null vtkPainterPolyDataMapper uses the vtkHardwareSelectionPolyDataPainter which make appropriate calls to BeginRenderProp(), EndRenderProp(), RenderProcessId(), RenderAttributeId() to render colors correctly. Until alternatives to vtkHardwareSelectionPolyDataPainter 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.
- See also
- vtkIdentColoredPainter
- Tests:
- vtkHardwareSelector (Tests)
Definition at line 78 of file vtkHardwareSelector.h.