39 #ifndef PCL_VISUALIZATION_POINT_PICKING_EVENT_H_
40 #define PCL_VISUALIZATION_POINT_PICKING_EVENT_H_
42 #include <pcl/pcl_macros.h>
45 #include <vtkCommand.h>
46 class vtkRenderWindowInteractor;
50 namespace visualization
66 Execute (vtkObject *caller,
unsigned long eventid,
void*);
69 performSinglePick (vtkRenderWindowInteractor *iren);
72 performSinglePick (vtkRenderWindowInteractor *iren,
float &x,
float &y,
float &z);
75 performAreaPick (vtkRenderWindowInteractor *iren, std::vector<int> &indices);
87 PointPickingEvent (
int idx) : idx_ (idx), idx2_ (-1), x_ (), y_ (), z_ (), x2_ (), y2_ (), z2_ () {}
88 PointPickingEvent (
int idx,
float x,
float y,
float z) : idx_ (idx), idx2_ (-1), x_ (x), y_ (y), z_ (z), x2_ (), y2_ (), z2_ () {}
90 PointPickingEvent (
int idx1,
int idx2,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2) :
91 idx_ (idx1), idx2_ (idx2), x_ (x1), y_ (y1), z_ (z1), x2_ (x2), y2_ (y2), z2_ (z2)
109 x = x_; y = y_; z = z_;
122 getPoints (
float &x1,
float &y1,
float &z1,
float &x2,
float &y2,
float &z2)
const
126 x1 = x_; y1 = y_; z1 = z_;
127 x2 = x2_; y2 = y2_; z2 = z2_;
bool getPoints(float &x1, float &y1, float &z1, float &x2, float &y2, float &z2) const
For situations when multiple points are selected in a sequence, return the point coordinates.
PointPickingEvent(int idx1, int idx2, float x1, float y1, float z1, float x2, float y2, float z2)
/brief Class representing 3D point picking events.
virtual ~PointPickingCallback()
Empty destructor.
static PointPickingCallback * New()
int getPointIndex() const
Obtain the ID of a point that the user just clicked on.
PointPickingEvent(int idx, float x, float y, float z)
PointPickingEvent(int idx)
bool getPointIndices(int &index_1, int &index_2) const
For situations where multiple points are selected in a sequence, return the points indices...
void getPoint(float &x, float &y, float &z) const
Obtain the XYZ point coordinates of a point that the user just clicked on.