Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SVTK_AreaPicker Class Reference

Rectangular picker class.

#include <SVTK_AreaPicker.h>

Inheritance diagram for SVTK_AreaPicker:
Inheritance graph

Public Types

enum  SelectionMode { RectangleMode, PolygonMode }
 
typedef std::vector< vtkIdType > TVectorIds
 
typedef std::map< vtkActor
*, TVectorIds
TVectorIdsMap
 

Public Member Functions

 vtkTypeMacro (SVTK_AreaPicker, vtkAbstractPropPicker)
 
 vtkSetMacro (Tolerance, double)
 
 vtkGetMacro (Tolerance, double)
 
 vtkSetMacro (PickPoints, int)
 Use these methods to pick points or points and cells. More...
 
 vtkGetMacro (PickPoints, int)
 
 vtkBooleanMacro (PickPoints, int)
 
int Pick (QVector< QPoint > &thePoints, vtkRenderer *theRenderer, SelectionMode theMode)
 
int Pick (double theSelectionX, double theSelectionY, double theSelectionX2, double theSelectionY2, vtkRenderer *theRenderer, SelectionMode theMode)
 
const TVectorIdsMapGetPointIdsMap () const
 
const TVectorIdsMapGetCellIdsMap () const
 

Static Public Member Functions

static SVTK_AreaPickerNew ()
 
static bool isPointInPolygon (const QPoint &thePoint, const QVector< QPoint > &thePolygon)
 

Protected Member Functions

 SVTK_AreaPicker ()
 
 ~SVTK_AreaPicker ()
 

Protected Attributes

double Tolerance
 tolerance for computation (% of window) More...
 
int PickPoints
 use the following to control picking mode More...
 
int mySelection [4]
 coordinates of bounding box of selection More...
 
TVectorIdsMap myPointIdsMap
 
TVectorIdsMap myCellIdsMap
 

Private Member Functions

virtual int Pick (double, double, double, vtkRenderer *)
 
void SelectVisiblePoints (QVector< QPoint > &thePoints, vtkRenderer *theRenderer, vtkDataSet *theInput, SVTK_AreaPicker::TVectorIds &theVisibleIds, SVTK_AreaPicker::TVectorIds &theInVisibleIds, double theTolerance, SelectionMode theMode)
 
void SelectVisibleCells (QVector< QPoint > &thePoints, vtkRenderer *theRenderer, vtkDataSet *theInput, SVTK_AreaPicker::TVectorIds &theVectorIds, double theTolerance, SelectionMode theMode)
 

Member Typedef Documentation

typedef std::vector<vtkIdType> SVTK_AreaPicker::TVectorIds
typedef std::map<vtkActor*,TVectorIds> SVTK_AreaPicker::TVectorIdsMap

Member Enumeration Documentation

Enumerator
RectangleMode 
PolygonMode 

Constructor & Destructor Documentation

SVTK_AreaPicker::SVTK_AreaPicker ( )
protected

References PickPoints, and Tolerance.

SVTK_AreaPicker::~SVTK_AreaPicker ( )
protected

Member Function Documentation

const SVTK_AreaPicker::TVectorIdsMap & SVTK_AreaPicker::GetCellIdsMap ( ) const

References myCellIdsMap.

const SVTK_AreaPicker::TVectorIdsMap & SVTK_AreaPicker::GetPointIdsMap ( ) const

References myPointIdsMap.

bool SVTK_AreaPicker::isPointInPolygon ( const QPoint &  thePoint,
const QVector< QPoint > &  thePolygon 
)
static
static SVTK_AreaPicker* SVTK_AreaPicker::New ( )
static
int SVTK_AreaPicker::Pick ( QVector< QPoint > &  thePoints,
vtkRenderer *  theRenderer,
SelectionMode  theMode 
)
int SVTK_AreaPicker::Pick ( double  theSelectionX,
double  theSelectionY,
double  theSelectionX2,
double  theSelectionY2,
vtkRenderer *  theRenderer,
SelectionMode  theMode 
)

References Pick().

int SVTK_AreaPicker::Pick ( double  ,
double  ,
double  ,
vtkRenderer *   
)
privatevirtual
void SVTK_AreaPicker::SelectVisibleCells ( QVector< QPoint > &  thePoints,
vtkRenderer *  theRenderer,
vtkDataSet *  theInput,
SVTK_AreaPicker::TVectorIds theVectorIds,
double  theTolerance,
SelectionMode  theMode 
)
private
void SVTK_AreaPicker::SelectVisiblePoints ( QVector< QPoint > &  thePoints,
vtkRenderer *  theRenderer,
vtkDataSet *  theInput,
SVTK_AreaPicker::TVectorIds theVisibleIds,
SVTK_AreaPicker::TVectorIds theInVisibleIds,
double  theTolerance,
SelectionMode  theMode 
)
private
SVTK_AreaPicker::vtkBooleanMacro ( PickPoints  ,
int   
)
SVTK_AreaPicker::vtkGetMacro ( Tolerance  ,
double   
)
SVTK_AreaPicker::vtkGetMacro ( PickPoints  ,
int   
)
SVTK_AreaPicker::vtkSetMacro ( Tolerance  ,
double   
)

Specify tolerance for performing pick operation. Tolerance is specified as fraction of rendering window size. (Rendering window size is measured across diagonal.)

SVTK_AreaPicker::vtkSetMacro ( PickPoints  ,
int   
)
SVTK_AreaPicker::vtkTypeMacro ( SVTK_AreaPicker  ,
vtkAbstractPropPicker   
)

Member Data Documentation

TVectorIdsMap SVTK_AreaPicker::myCellIdsMap
protected
TVectorIdsMap SVTK_AreaPicker::myPointIdsMap
protected
int SVTK_AreaPicker::mySelection[4]
protected
int SVTK_AreaPicker::PickPoints
protected
double SVTK_AreaPicker::Tolerance
protected

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