44 #include <vtkCommand.h>
45 class vtkRenderWindowInteractor;
49 namespace visualization
65 Execute (vtkObject *caller,
unsigned long eventid,
void*)
override;
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_;
void Execute(vtkObject *caller, unsigned long eventid, void *) override
int performAreaPick(vtkRenderWindowInteractor *iren, pcl::Indices &indices) const
~PointPickingCallback() override=default
Empty destructor.
static PointPickingCallback * New()
int performSinglePick(vtkRenderWindowInteractor *iren, float &x, float &y, float &z)
int performSinglePick(vtkRenderWindowInteractor *iren)
/brief Class representing 3D point picking events.
bool getPointIndices(int &index_1, int &index_2) const
For situations where multiple points are selected in a sequence, return the points indices.
int getPointIndex() const
Obtain the ID of a point that the user just clicked on.
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.
void getPoint(float &x, float &y, float &z) const
Obtain the XYZ point coordinates of a point that the user just clicked on.
PointPickingEvent(int idx1, int idx2, float x1, float y1, float z1, float x2, float y2, float z2)
PointPickingEvent(int idx)
PointPickingEvent(int idx, float x, float y, float z)
IndicesAllocator<> Indices
Type used for indices in PCL.
Defines all the PCL and non-PCL macros used.
Defines basic non-point types used by PCL.