41 #include <pcl/pcl_macros.h>
44 #include <vtkCommand.h>
45 class vtkRenderWindowInteractor;
49 namespace visualization
65 Execute (vtkObject *caller,
unsigned long eventid,
void*)
override;
68 performSinglePick (vtkRenderWindowInteractor *iren);
71 performSinglePick (vtkRenderWindowInteractor *iren,
float &x,
float &y,
float &z);
74 performAreaPick (vtkRenderWindowInteractor *iren, std::vector<int> &indices)
const;
86 PointPickingEvent (
int idx) : idx_ (idx), idx2_ (-1), x_ (), y_ (), z_ (), x2_ (), y2_ (), z2_ () {}
87 PointPickingEvent (
int idx,
float x,
float y,
float z) : idx_ (idx), idx2_ (-1), x_ (x), y_ (y), z_ (z), x2_ (), y2_ (), z2_ () {}
89 PointPickingEvent (
int idx1,
int idx2,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2) :
90 idx_ (idx1), idx2_ (idx2), x_ (x1), y_ (y1), z_ (z1), x2_ (x2), y2_ (y2), z2_ (z2)
114 x = x_; y = y_; z = z_;
127 getPoints (
float &x1,
float &y1,
float &z1,
float &x2,
float &y2,
float &z2)
const
131 x1 = x_; y1 = y_; z1 = z_;
132 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.
~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.