VTK
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkHardwareSelector Class Referenceabstract

manager for OpenGL-based selection. More...

#include <vtkHardwareSelector.h>

Inheritance diagram for vtkHardwareSelector:
[legend]
Collaboration diagram for vtkHardwareSelector:
[legend]

Classes

struct  PixelInformation
 Struct used to return information about a pixel location. More...
 

Public Types

enum  PassTypes {
  PROCESS_PASS, ACTOR_PASS, COMPOSITE_INDEX_PASS, ID_LOW24,
  ID_MID24, ID_HIGH16, MAX_KNOWN_PASS = ID_HIGH16, MIN_KNOWN_PASS = PROCESS_PASS
}
 
typedef vtkObject Superclass
 

Public Member Functions

virtual int IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkHardwareSelectorNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
vtkSelectionSelect ()
 Perform the selection. More...
 
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 vtkSelectionGenerateSelection ()
 Generates the vtkSelection from pixel buffers. More...
 
virtual vtkSelectionGenerateSelection (unsigned int r[4])
 
virtual vtkSelectionGenerateSelection (unsigned int x1, unsigned int y1, unsigned int x2, unsigned int y2)
 
virtual vtkSelectionGeneratePolygonSelection (int *polygonPoints, vtkIdType count)
 Generates the vtkSelection from pixel buffers. More...
 
vtkPropGetPropFromID (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...
 
virtual void SetRenderer (vtkRenderer *)
 Get/Set the renderer to perform the selection on. More...
 
virtual vtkRendererGetRenderer ()
 Get/Set the renderer to perform the selection on. More...
 
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])
 Get/Set the area to select as (xmin, ymin, xmax, ymax). More...
 
virtual unsigned intGetArea ()
 Get/Set the area to select as (xmin, ymin, xmax, ymax). More...
 
virtual void GetArea (unsigned int &, unsigned int &, unsigned int &, unsigned int &)
 Get/Set the area to select as (xmin, ymin, xmax, ymax). More...
 
virtual void GetArea (unsigned int [4])
 Get/Set the area to select as (xmin, ymin, xmax, ymax). More...
 
virtual void SetFieldAssociation (int)
 Set the field type to select. More...
 
virtual int GetFieldAssociation ()
 Set the field type to select. More...
 
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 ()
 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 CaptureBuffers ()
 It is possible to use the vtkHardwareSelector for a custom picking. More...
 
PixelInformation GetPixelInformation (const unsigned int display_position[2])
 It is possible to use the vtkHardwareSelector for a custom picking. More...
 
PixelInformation GetPixelInformation (const unsigned int display_position[2], int maxDist)
 It is possible to use the vtkHardwareSelector for a custom picking. More...
 
PixelInformation GetPixelInformation (const unsigned int display_position[2], int maxDist, unsigned int selected_position[2])
 It is possible to use the vtkHardwareSelector for a custom picking. More...
 
void ClearBuffers ()
 It is possible to use the vtkHardwareSelector for a custom picking. More...
 
virtual void BeginRenderProp ()
 Called by the mapper (vtkHardwareSelectionPolyDataPainter) before and after rendering each prop. More...
 
virtual void EndRenderProp ()
 Called by the mapper (vtkHardwareSelectionPolyDataPainter) before and after rendering each prop. More...
 
virtual void SetProcessID (int)
 Get/Set the process id. More...
 
virtual int GetProcessID ()
 Get/Set the process id. More...
 
virtual floatGetPropColorValue ()
 Get/Set the color to be used by the prop when drawing. More...
 
virtual void GetPropColorValue (float &, float &, float &)
 Get/Set the color to be used by the prop when drawing. More...
 
virtual void GetPropColorValue (float [3])
 Get/Set the color to be used by the prop when drawing. More...
 
virtual void SetPropColorValue (float, float, float)
 Get/Set the color to be used by the prop when drawing. More...
 
virtual void SetPropColorValue (float [3])
 Get/Set the color to be used by the prop when drawing. More...
 
virtual int GetCurrentPass ()
 Get the current pass number. More...
 
- Public Member Functions inherited from vtkObject
 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...
 
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)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
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)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
int HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
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)
 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, 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)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
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 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 void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkHardwareSelectorNew ()
 
static int IsTypeOf (const char *type)
 
static vtkHardwareSelectorSafeDownCast (vtkObjectBase *o)
 
static void Convert (int id, float tcoord[3])
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkHardwareSelector ()
 
 ~vtkHardwareSelector () override
 
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)
 
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)
 
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)
 pos must be relative to the lower-left corner of this->Area. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

unsigned char * PixBuffer [10]
 
int ProcessID
 
int CurrentPass
 
int InPropRender
 
int PropID
 
float PropColorValue [3]
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 
vtkRendererRenderer
 Clears all pixel buffers. More...
 
unsigned int Area [4]
 Clears all pixel buffers. More...
 
int FieldAssociation
 Clears all pixel buffers. More...
 
bool UseProcessIdFromData
 Clears all pixel buffers. More...
 
vtkIdType MaxAttributeId
 Clears all pixel buffers. More...
 
void ReleasePixBuffers ()
 Clears all pixel buffers. More...
 

Detailed Description

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:

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

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
vtkOpenGLHardwareSelector

Definition at line 64 of file vtkHardwareSelector.h.

Member Typedef Documentation

◆ Superclass

Definition at line 91 of file vtkHardwareSelector.h.

Member Enumeration Documentation

◆ PassTypes

Enumerator
PROCESS_PASS 
ACTOR_PASS 
COMPOSITE_INDEX_PASS 
ID_LOW24 
ID_MID24 
ID_HIGH16 
MAX_KNOWN_PASS 
MIN_KNOWN_PASS 

Definition at line 253 of file vtkHardwareSelector.h.

Constructor & Destructor Documentation

◆ vtkHardwareSelector()

vtkHardwareSelector::vtkHardwareSelector ( )
protected

◆ ~vtkHardwareSelector()

vtkHardwareSelector::~vtkHardwareSelector ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkHardwareSelector* vtkHardwareSelector::New ( )
static

◆ IsTypeOf()

static int vtkHardwareSelector::IsTypeOf ( const char *  type)
static

◆ IsA()

virtual int vtkHardwareSelector::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

Reimplemented in vtkPHardwareSelector, and vtkOpenGLHardwareSelector.

◆ SafeDownCast()

static vtkHardwareSelector* vtkHardwareSelector::SafeDownCast ( vtkObjectBase o)
static

◆ NewInstanceInternal()

virtual vtkObjectBase* vtkHardwareSelector::NewInstanceInternal ( ) const
protectedvirtual

◆ NewInstance()

vtkHardwareSelector* vtkHardwareSelector::NewInstance ( ) const

◆ PrintSelf()

void vtkHardwareSelector::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

Reimplemented in vtkPHardwareSelector, and vtkOpenGLHardwareSelector.

◆ SetRenderer()

virtual void vtkHardwareSelector::SetRenderer ( vtkRenderer )
virtual

Get/Set the renderer to perform the selection on.

◆ GetRenderer()

virtual vtkRenderer* vtkHardwareSelector::GetRenderer ( )
virtual

Get/Set the renderer to perform the selection on.

◆ SetArea() [1/2]

virtual void vtkHardwareSelector::SetArea ( unsigned int  ,
unsigned int  ,
unsigned int  ,
unsigned int   
)
virtual

Get/Set the area to select as (xmin, ymin, xmax, ymax).

◆ SetArea() [2/2]

virtual void vtkHardwareSelector::SetArea ( unsigned int  [4])
virtual

Get/Set the area to select as (xmin, ymin, xmax, ymax).

◆ GetArea() [1/3]

virtual unsigned int* vtkHardwareSelector::GetArea ( )
virtual

Get/Set the area to select as (xmin, ymin, xmax, ymax).

◆ GetArea() [2/3]

virtual void vtkHardwareSelector::GetArea ( unsigned int ,
unsigned int ,
unsigned int ,
unsigned int  
)
virtual

Get/Set the area to select as (xmin, ymin, xmax, ymax).

◆ GetArea() [3/3]

virtual void vtkHardwareSelector::GetArea ( unsigned int  [4])
virtual

Get/Set the area to select as (xmin, ymin, xmax, ymax).

◆ SetFieldAssociation()

virtual void vtkHardwareSelector::SetFieldAssociation ( int  )
virtual

Set the field type to select.

Valid values are

◆ GetFieldAssociation()

virtual int vtkHardwareSelector::GetFieldAssociation ( )
virtual

Set the field type to select.

Valid values are

◆ SetUseProcessIdFromData()

virtual void vtkHardwareSelector::SetUseProcessIdFromData ( bool  )
virtual

In some parallel rendering setups, the process id for elements must be obtained from the data itself, rather than the rendering process' id.

In that case, set this flag to ON (default OFF).

◆ GetUseProcessIdFromData()

virtual bool vtkHardwareSelector::GetUseProcessIdFromData ( )
virtual

In some parallel rendering setups, the process id for elements must be obtained from the data itself, rather than the rendering process' id.

In that case, set this flag to ON (default OFF).

◆ Select()

vtkSelection* vtkHardwareSelector::Select ( )

Perform the selection.

Returns a new instance of vtkSelection containing the selection on success.

◆ CaptureBuffers()

virtual bool vtkHardwareSelector::CaptureBuffers ( )
virtual

It is possible to use the vtkHardwareSelector for a custom picking.

(Look at vtkScenePicker). In that case instead of Select() on can use CaptureBuffers() to render the selection buffers and then get information about pixel locations suing GetPixelInformation(). Use ClearBuffers() to clear buffers after one's done with the scene. The optional final parameter maxDist will look for a cell within the specified number of pixels from display_position. When using the overload with the optional selected_position argument, selected_position is filled with the position for which the PixelInformation is being returned. This is useful when maxDist > 0 to determine which position's pixel information is was returned.

Reimplemented in vtkPHardwareSelector.

◆ GetPixelInformation() [1/3]

PixelInformation vtkHardwareSelector::GetPixelInformation ( const unsigned int  display_position[2])
inline

It is possible to use the vtkHardwareSelector for a custom picking.

(Look at vtkScenePicker). In that case instead of Select() on can use CaptureBuffers() to render the selection buffers and then get information about pixel locations suing GetPixelInformation(). Use ClearBuffers() to clear buffers after one's done with the scene. The optional final parameter maxDist will look for a cell within the specified number of pixels from display_position. When using the overload with the optional selected_position argument, selected_position is filled with the position for which the PixelInformation is being returned. This is useful when maxDist > 0 to determine which position's pixel information is was returned.

Definition at line 156 of file vtkHardwareSelector.h.

◆ GetPixelInformation() [2/3]

PixelInformation vtkHardwareSelector::GetPixelInformation ( const unsigned int  display_position[2],
int  maxDist 
)
inline

It is possible to use the vtkHardwareSelector for a custom picking.

(Look at vtkScenePicker). In that case instead of Select() on can use CaptureBuffers() to render the selection buffers and then get information about pixel locations suing GetPixelInformation(). Use ClearBuffers() to clear buffers after one's done with the scene. The optional final parameter maxDist will look for a cell within the specified number of pixels from display_position. When using the overload with the optional selected_position argument, selected_position is filled with the position for which the PixelInformation is being returned. This is useful when maxDist > 0 to determine which position's pixel information is was returned.

Definition at line 158 of file vtkHardwareSelector.h.

◆ GetPixelInformation() [3/3]

PixelInformation vtkHardwareSelector::GetPixelInformation ( const unsigned int  display_position[2],
int  maxDist,
unsigned int  selected_position[2] 
)

It is possible to use the vtkHardwareSelector for a custom picking.

(Look at vtkScenePicker). In that case instead of Select() on can use CaptureBuffers() to render the selection buffers and then get information about pixel locations suing GetPixelInformation(). Use ClearBuffers() to clear buffers after one's done with the scene. The optional final parameter maxDist will look for a cell within the specified number of pixels from display_position. When using the overload with the optional selected_position argument, selected_position is filled with the position for which the PixelInformation is being returned. This is useful when maxDist > 0 to determine which position's pixel information is was returned.

◆ ClearBuffers()

void vtkHardwareSelector::ClearBuffers ( )
inline

It is possible to use the vtkHardwareSelector for a custom picking.

(Look at vtkScenePicker). In that case instead of Select() on can use CaptureBuffers() to render the selection buffers and then get information about pixel locations suing GetPixelInformation(). Use ClearBuffers() to clear buffers after one's done with the scene. The optional final parameter maxDist will look for a cell within the specified number of pixels from display_position. When using the overload with the optional selected_position argument, selected_position is filled with the position for which the PixelInformation is being returned. This is useful when maxDist > 0 to determine which position's pixel information is was returned.

Definition at line 162 of file vtkHardwareSelector.h.

◆ RenderCompositeIndex()

virtual void vtkHardwareSelector::RenderCompositeIndex ( unsigned int  index)
virtual

Called by any vtkMapper or vtkProp subclass to render a composite-index.

Currently indices >= 0xffffff are not supported.

Reimplemented in vtkOpenGLHardwareSelector.

◆ RenderAttributeId()

virtual void vtkHardwareSelector::RenderAttributeId ( vtkIdType  attribid)
virtual

Called by any vtkMapper or vtkProp subclass to render an attribute's id.

Reimplemented in vtkOpenGLHardwareSelector.

◆ RenderProcessId()

virtual void vtkHardwareSelector::RenderProcessId ( unsigned int  processid)
virtual

Called by any vtkMapper or subclass to render process id.

This has any effect when this->UseProcessIdFromData is true.

Reimplemented in vtkOpenGLHardwareSelector.

◆ Render()

int vtkHardwareSelector::Render ( vtkRenderer renderer,
vtkProp **  propArray,
int  propArrayCount 
)

Called by vtkRenderer to render the selection pass.

Returns the number of props rendered.

◆ BeginRenderProp() [1/2]

virtual void vtkHardwareSelector::BeginRenderProp ( )
virtual

Called by the mapper (vtkHardwareSelectionPolyDataPainter) before and after rendering each prop.

Reimplemented in vtkOpenGLHardwareSelector.

◆ EndRenderProp() [1/2]

virtual void vtkHardwareSelector::EndRenderProp ( )
virtual

Called by the mapper (vtkHardwareSelectionPolyDataPainter) before and after rendering each prop.

Reimplemented in vtkOpenGLHardwareSelector.

◆ SetProcessID()

virtual void vtkHardwareSelector::SetProcessID ( int  )
virtual

Get/Set the process id.

If process id < 0 (default -1), then the PROCESS_PASS is not rendered.

◆ GetProcessID()

virtual int vtkHardwareSelector::GetProcessID ( )
virtual

Get/Set the process id.

If process id < 0 (default -1), then the PROCESS_PASS is not rendered.

◆ GetPropColorValue() [1/3]

virtual float* vtkHardwareSelector::GetPropColorValue ( )
virtual

Get/Set the color to be used by the prop when drawing.

◆ GetPropColorValue() [2/3]

virtual void vtkHardwareSelector::GetPropColorValue ( float ,
float ,
float  
)
virtual

Get/Set the color to be used by the prop when drawing.

◆ GetPropColorValue() [3/3]

virtual void vtkHardwareSelector::GetPropColorValue ( float  [3])
virtual

Get/Set the color to be used by the prop when drawing.

◆ SetPropColorValue() [1/2]

virtual void vtkHardwareSelector::SetPropColorValue ( float  ,
float  ,
float   
)
virtual

Get/Set the color to be used by the prop when drawing.

◆ SetPropColorValue() [2/2]

virtual void vtkHardwareSelector::SetPropColorValue ( float  [3])
virtual

Get/Set the color to be used by the prop when drawing.

◆ GetCurrentPass()

virtual int vtkHardwareSelector::GetCurrentPass ( )
virtual

Get the current pass number.

◆ GenerateSelection() [1/3]

virtual vtkSelection* vtkHardwareSelector::GenerateSelection ( )
inlinevirtual

Generates the vtkSelection from pixel buffers.

Requires that CaptureBuffers() has already been called. Optionally you may pass a screen region (xmin, ymin, xmax, ymax) to generate a selection from. The region must be a subregion of the region specified by SetArea(), otherwise it will be clipped to that region.

Definition at line 230 of file vtkHardwareSelector.h.

◆ GenerateSelection() [2/3]

virtual vtkSelection* vtkHardwareSelector::GenerateSelection ( unsigned int  r[4])
inlinevirtual

Definition at line 232 of file vtkHardwareSelector.h.

◆ GenerateSelection() [3/3]

virtual vtkSelection* vtkHardwareSelector::GenerateSelection ( unsigned int  x1,
unsigned int  y1,
unsigned int  x2,
unsigned int  y2 
)
virtual

◆ GeneratePolygonSelection()

virtual vtkSelection* vtkHardwareSelector::GeneratePolygonSelection ( int polygonPoints,
vtkIdType  count 
)
virtual

Generates the vtkSelection from pixel buffers.

Same as GenerateSelection, except this one use a polygon, instead of a rectangle region, and select elements inside the polygon. NOTE: The CaptureBuffers() needs to be called first.

◆ GetPropFromID()

vtkProp* vtkHardwareSelector::GetPropFromID ( int  id)

returns the prop associated with a ID.

This is valid only until ReleasePixBuffers() gets called.

◆ PassTypeToString()

std::string vtkHardwareSelector::PassTypeToString ( PassTypes  type)

Convert a PassTypes enum value to a human readable string.

◆ Convert() [1/4]

static void vtkHardwareSelector::Convert ( int  id,
float  tcoord[3] 
)
inlinestatic

Definition at line 270 of file vtkHardwareSelector.h.

◆ PreCapturePass()

virtual void vtkHardwareSelector::PreCapturePass ( int  pass)
inlineprotectedvirtual

Reimplemented in vtkOpenGLHardwareSelector.

Definition at line 282 of file vtkHardwareSelector.h.

◆ PostCapturePass()

virtual void vtkHardwareSelector::PostCapturePass ( int  pass)
inlineprotectedvirtual

Reimplemented in vtkOpenGLHardwareSelector.

Definition at line 283 of file vtkHardwareSelector.h.

◆ BeginRenderProp() [2/2]

virtual void vtkHardwareSelector::BeginRenderProp ( vtkRenderWindow )
protectedpure virtual

Implemented in vtkOpenGLHardwareSelector.

◆ EndRenderProp() [2/2]

virtual void vtkHardwareSelector::EndRenderProp ( vtkRenderWindow )
protectedpure virtual

Implemented in vtkOpenGLHardwareSelector.

◆ Convert() [2/4]

int vtkHardwareSelector::Convert ( unsigned long  offset,
unsigned char *  pb 
)
inlineprotected

Definition at line 290 of file vtkHardwareSelector.h.

◆ Convert() [3/4]

int vtkHardwareSelector::Convert ( unsigned int  pos[2],
unsigned char *  pb 
)
inlineprotected

pos must be relative to the lower-left corner of this->Area.

Definition at line 314 of file vtkHardwareSelector.h.

◆ Convert() [4/4]

int vtkHardwareSelector::Convert ( int  xx,
int  yy,
unsigned char *  pb 
)
inlineprotected

pos must be relative to the lower-left corner of this->Area.

Definition at line 316 of file vtkHardwareSelector.h.

◆ GetID()

vtkIdType vtkHardwareSelector::GetID ( int  low24,
int  mid24,
int  high16 
)
inlineprotected

Definition at line 337 of file vtkHardwareSelector.h.

◆ PassRequired()

virtual bool vtkHardwareSelector::PassRequired ( int  pass)
protectedvirtual

Returns is the pass indicated is needed.

◆ IsPropHit()

bool vtkHardwareSelector::IsPropHit ( int  propid)
protected

After the ACTOR_PASS this return true or false depending upon whether the prop was hit in the ACTOR_PASS.

This makes it possible to skip props that are not involved in the selection after the first pass.

◆ GetPropID()

virtual int vtkHardwareSelector::GetPropID ( int  idx,
vtkProp vtkNotUsedprop 
)
inlineprotectedvirtual

Return a unique ID for the prop.

Definition at line 363 of file vtkHardwareSelector.h.

◆ BeginSelection()

virtual void vtkHardwareSelector::BeginSelection ( )
protectedvirtual

Reimplemented in vtkOpenGLHardwareSelector.

◆ EndSelection()

virtual void vtkHardwareSelector::EndSelection ( )
protectedvirtual

Reimplemented in vtkOpenGLHardwareSelector.

◆ SavePixelBuffer()

virtual void vtkHardwareSelector::SavePixelBuffer ( int  passNo)
protectedvirtual

Reimplemented in vtkOpenGLHardwareSelector.

◆ BuildPropHitList()

void vtkHardwareSelector::BuildPropHitList ( unsigned char *  rgbData)
protected

◆ ReleasePixBuffers()

void vtkHardwareSelector::ReleasePixBuffers ( )
protected

Clears all pixel buffers.

Member Data Documentation

◆ Renderer

vtkRenderer* vtkHardwareSelector::Renderer
protected

Clears all pixel buffers.

Definition at line 377 of file vtkHardwareSelector.h.

◆ Area

unsigned int vtkHardwareSelector::Area[4]
protected

Clears all pixel buffers.

Definition at line 378 of file vtkHardwareSelector.h.

◆ FieldAssociation

int vtkHardwareSelector::FieldAssociation
protected

Clears all pixel buffers.

Definition at line 379 of file vtkHardwareSelector.h.

◆ UseProcessIdFromData

bool vtkHardwareSelector::UseProcessIdFromData
protected

Clears all pixel buffers.

Definition at line 380 of file vtkHardwareSelector.h.

◆ MaxAttributeId

vtkIdType vtkHardwareSelector::MaxAttributeId
protected

Clears all pixel buffers.

Definition at line 381 of file vtkHardwareSelector.h.

◆ PixBuffer

unsigned char* vtkHardwareSelector::PixBuffer[10]
protected

Definition at line 385 of file vtkHardwareSelector.h.

◆ ProcessID

int vtkHardwareSelector::ProcessID
protected

Definition at line 386 of file vtkHardwareSelector.h.

◆ CurrentPass

int vtkHardwareSelector::CurrentPass
protected

Definition at line 387 of file vtkHardwareSelector.h.

◆ InPropRender

int vtkHardwareSelector::InPropRender
protected

Definition at line 388 of file vtkHardwareSelector.h.

◆ PropID

int vtkHardwareSelector::PropID
protected

Definition at line 389 of file vtkHardwareSelector.h.

◆ PropColorValue

float vtkHardwareSelector::PropColorValue[3]
protected

Definition at line 390 of file vtkHardwareSelector.h.


The documentation for this class was generated from the following file: