ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvPointPickingGenericInterface.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 // Local
11 #include "ecvCommon.h"
12 #include "ecvOverlayDialog.h"
13 #include "ecvPickingListener.h"
14 
15 // cloudViewer
16 #include <CVGeom.h>
17 
18 // system
19 #include <vector>
20 
21 class ccPointCloud;
22 class ccHObject;
23 class ccPickingHub;
24 
29  public ccPickingListener {
30  Q_OBJECT
31 
32 public:
34  explicit ccPointPickingGenericInterface(ccPickingHub* pickingHub,
35  QWidget* parent = nullptr);
37  ~ccPointPickingGenericInterface() override = default;
38 
39  // inherited from ccOverlayDialog
40  bool linkWith(QWidget* win) override;
41  bool start() override;
42  void stop(bool state) override;
43 
45  void onItemPicked(const PickedItem& pi) override;
46 
47 protected:
49 
54  virtual void processPickedPoint(ccPointCloud* cloud,
55  unsigned pointIndex,
56  int x,
57  int y) = 0;
58 
61 };
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Generic overlay dialog interface.
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
Point/triangle picking listener interface.
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
void stop(bool state) override
Stops process/dialog.
~ccPointPickingGenericInterface() override=default
Destructor.
ccPointPickingGenericInterface(ccPickingHub *pickingHub, QWidget *parent=nullptr)
Default constructor.
virtual void processPickedPoint(ccPointCloud *cloud, unsigned pointIndex, int x, int y)=0
Generic method to process picked points.
bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
void onItemPicked(const PickedItem &pi) override
Inherited from ccPickingListener.