ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvPointPropertiesDlg.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 
11 
12 // Local
13 #include <ui_pointPropertiesDlg.h>
14 
15 class cc2DLabel;
16 class cc2DViewportLabel;
17 class ccHObject;
18 
21  public Ui::PointPropertiesDlg {
22  Q_OBJECT
23 
24 public:
26  explicit ccPointPropertiesDlg(ccPickingHub* pickingHub, QWidget* parent);
28  virtual ~ccPointPropertiesDlg();
29 
30  // inherited from ccPointPickingGenericInterface
31  virtual bool start() override;
32  virtual void stop(bool state) override;
33  virtual bool linkWith(QWidget* win) override;
34 
35 protected slots:
36 
37  void onClose();
40  void activateAngleDisplay();
41  void activate2DZonePicking();
42  void initializeState();
43  void exportCurrentLabel();
44  void update2DZone(int x, int y, Qt::MouseButtons buttons);
45  void processClickedPoint(int x, int y);
46  void close2DZone();
47 
48 signals:
49 
51  void newLabel(ccHObject*);
52 
53 protected:
56 
57  // inherited from ccPointPickingGenericInterface
58  void processPickedPoint(ccPointCloud* cloud,
59  unsigned pointIndex,
60  int x,
61  int y) override;
62 
65 
68 
71 };
ecvDisplayTools::buttonReleased
void buttonReleased()
Signal emitted when a mouse button is released (cursor on the window)
cc2DLabel::addPickedPoint
bool addPickedPoint(ccGenericPointCloud *cloud, unsigned pointIndex, bool entityCenter=false)
Adds a point to this label.
Definition: ecv2DLabel.cpp:400
s_last2DLabelComment
static QString s_last2DLabelComment("")
cc2DViewportLabel
2D viewport label
Definition: ecv2DViewportLabel.h:14
ccPointPropertiesDlg::activatePointPropertiesDisplay
void activatePointPropertiesDisplay()
Definition: ecvPointPropertiesDlg.cpp:119
ccPointPropertiesDlg::ccPointPropertiesDlg
ccPointPropertiesDlg(ccPickingHub *pickingHub, QWidget *parent)
Default constructor.
Definition: ecvPointPropertiesDlg.cpp:30
cc2DLabel::setDisplayedIn2D
void setDisplayedIn2D(bool state)
Whether to display the label in 2D.
Definition: ecv2DLabel.h:114
ccPointPropertiesDlg::initializeState
void initializeState()
Definition: ecvPointPropertiesDlg.cpp:170
ccPointPropertiesDlg::linkWith
virtual bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
Definition: ecvPointPropertiesDlg.cpp:70
ecvDisplayTools::mouseMoved
void mouseMoved(int x, int y, Qt::MouseButtons buttons)
Signal emitted when the mouse is moved.
ccPointPropertiesDlg::POINT_POINT_DISTANCE
@ POINT_POINT_DISTANCE
Definition: ecvPointPropertiesDlg.h:55
ecvDisplayTools::leftButtonClicked
void leftButtonClicked(int x, int y)
Signal emitted when the left mouse button is cliked on the window.
x
normal_z x
Definition: my_point_types.h:165
Tuple3Tpl::x
Type x
Definition: CVGeom.h:137
cc2DLabel::displayPointLegend
void displayPointLegend(bool state)
Whether to display the point(s) legend (title only)
Definition: ecv2DLabel.h:108
ecvDisplayTools::INTERACT_SEND_ALL_SIGNALS
@ INTERACT_SEND_ALL_SIGNALS
Definition: ecvDisplayTools.h:154
cc2DLabel::updateLabel
void updateLabel()
Definition: ecv2DLabel.cpp:312
ccPointPropertiesDlg::activateAngleDisplay
void activateAngleDisplay()
Definition: ecvPointPropertiesDlg.cpp:145
ecvDisplayTools::GlWidth
static int GlWidth()
Returns the OpenGL context width.
Definition: ecvDisplayTools.h:2038
cc2DViewportLabel::roi
const float * roi() const
Returns ROI (relative to screen)
Definition: ecv2DViewportLabel.h:26
cc2DLabel::clear
void clear(bool ignoreDependencies=false, bool ignoreCaption=true)
Clears label.
Definition: ecv2DLabel.cpp:240
ccPointPropertiesDlg::m_rect2DLabel
cc2DViewportLabel * m_rect2DLabel
Associated 2D label.
Definition: ecvPointPropertiesDlg.h:70
signals
#define signals
Definition: PythonPlugin.cpp:26
ccObject::setName
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
ecvPointPropertiesDlg.h
ecvDisplayTools.h
ccPointPropertiesDlg::start
virtual bool start() override
Starts process.
Definition: ecvPointPropertiesDlg.cpp:102
ScalarField.h
CVLog.h
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
cc2DLabel
2D label (typically attached to points)
Definition: ecv2DLabel.h:22
ccDrawableObject::setSelected
virtual void setSelected(bool state)
Selects/Unselects entity.
Definition: ecvDrawableObject.h:70
cc2DLabel::getLabelContent
QStringList getLabelContent(int precision) const
Gets label content (as it will be displayed)
Definition: ecv2DLabel.cpp:700
ccPointPropertiesDlg::m_pickingMode
Mode m_pickingMode
Current picking mode.
Definition: ecvPointPropertiesDlg.h:64
cc2DViewportLabel::setRoi
void setRoi(const float *roi)
Sets ROI (relative to screen)
Definition: ecv2DViewportLabel.cpp:29
cc2DLabel::getPickedPoint
const PickedPoint & getPickedPoint(unsigned index) const
Returns a given point.
Definition: ecv2DLabel.h:194
cc2DLabel::setPosition
void setPosition(float x, float y)
Sets relative position.
Definition: ecv2DLabel.cpp:225
ecvDisplayTools::AddToOwnDB
static void AddToOwnDB(ccHObject *obj, bool noDependency=true)
Adds an entity to window own DB.
Definition: ecvDisplayTools.cpp:2093
ecvDisplayTools::TRANSFORM_CAMERA
static INTERACTION_FLAGS TRANSFORM_CAMERA()
Definition: ecvDisplayTools.cpp:67
ccDrawableObject::isSelected
virtual bool isSelected() const
Returns whether entity is selected or not.
Definition: ecvDrawableObject.h:68
ecvDisplayTools::GetCurrentScreen
static QWidget * GetCurrentScreen()
Definition: ecvDisplayTools.h:666
slots
#define slots
Definition: PythonPlugin.cpp:25
ecv2DViewportLabel.h
y
normal_z y
Definition: my_point_types.h:168
ccPointPickingGenericInterface::linkWith
bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
Definition: ecvPointPickingGenericInterface.cpp:30
cc2DViewportLabel::updateLabel
void updateLabel()
Definition: ecv2DViewportLabel.cpp:78
Vector3Tpl< double >
ecvDisplayTools::SetRedrawRecursive
static void SetRedrawRecursive(bool redraw=false)
Definition: ecvDisplayTools.cpp:1992
ecv2DLabel.h
Ui
Definition: sfEditDlg.h:16
ccPointPropertiesDlg::onClose
void onClose()
Definition: ecvPointPropertiesDlg.cpp:117
ccPointPropertiesDlg::POINTS_ANGLE
@ POINTS_ANGLE
Definition: ecvPointPropertiesDlg.h:55
ccPointPropertiesDlg::m_label
cc2DLabel * m_label
Associated 3D label.
Definition: ecvPointPropertiesDlg.h:67
cc2DLabel::size
unsigned size() const
Returns current size.
Definition: ecv2DLabel.h:74
ccPointPropertiesDlg::close2DZone
void close2DZone()
Definition: ecvPointPropertiesDlg.cpp:337
ecvDisplayTools::GetViewportParameters
static const ecvViewportParameters & GetViewportParameters()
Definition: ecvDisplayTools.cpp:2636
ccPointPropertiesDlg::activate2DZonePicking
void activate2DZonePicking()
Definition: ecvPointPropertiesDlg.cpp:157
cc2DViewportObject::setParameters
void setParameters(const ecvViewportParameters &params)
Sets perspective view state.
Definition: ecv2DViewportObject.h:27
ccPointPropertiesDlg
Dialog for simple point picking (information, distance, etc.)
Definition: ecvPointPropertiesDlg.h:20
ccPointPropertiesDlg::processClickedPoint
void processClickedPoint(int x, int y)
Definition: ecvPointPropertiesDlg.cpp:268
ccPointPropertiesDlg::activateDistanceDisplay
void activateDistanceDisplay()
Definition: ecvPointPropertiesDlg.cpp:133
ccDrawableObject::setVisible
virtual void setVisible(bool state)
Sets entity visibility.
Definition: ecvDrawableObject.h:40
cc2DLabel::getName
virtual QString getName() const override
Returns object name.
Definition: ecv2DLabel.cpp:196
ecvGuiParameters.h
ecvDisplayTools::USE_2D
static bool USE_2D
Definition: ecvDisplayTools.h:2001
ccPointPropertiesDlg::Mode
Mode
Picking mode.
Definition: ecvPointPropertiesDlg.h:55
ccPointPropertiesDlg::update2DZone
void update2DZone(int x, int y, Qt::MouseButtons buttons)
Definition: ecvPointPropertiesDlg.cpp:308
ecvGui::Parameters
static const ParamStruct & Parameters()
Returns the stored values of each parameter.
Definition: ecvGuiParameters.cpp:24
ccPointPickingGenericInterface::stop
void stop(bool state) override
Stops process/dialog.
Definition: ecvPointPickingGenericInterface.cpp:64
ccDrawableObject::setRedraw
virtual void setRedraw(bool state)
Sets entity redraw mode.
Definition: ecvDrawableObject.h:48
ecvDisplayTools::TheInstance
static ecvDisplayTools * TheInstance()
Definition: ecvDisplayTools.cpp:237
ccPickingHub
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
ccDrawableObject::isVisible
virtual bool isVisible() const
Returns whether entity is visible or not.
Definition: ecvDrawableObject.h:38
ecvDisplayTools::RemoveFromOwnDB
static void RemoveFromOwnDB(ccHObject *obj)
Removes an entity from window own DB.
Definition: ecvDisplayTools.cpp:2108
ecvPointPickingGenericInterface.h
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Tuple3Tpl::y
Type y
Definition: CVGeom.h:137
ecvDisplayTools::RedrawDisplay
static void RedrawDisplay(bool only2D=false, bool forceRedraw=true)
Definition: ecvDisplayTools.cpp:2883
ccPointPropertiesDlg::processPickedPoint
void processPickedPoint(ccPointCloud *cloud, unsigned pointIndex, int x, int y) override
Generic method to process picked points.
Definition: ecvPointPropertiesDlg.cpp:222
ecvDisplayTools::SetInteractionMode
static void SetInteractionMode(INTERACTION_FLAGS flags)
Definition: ecvDisplayTools.cpp:2130
cc2DLabel::PickedPoint::cloud
ccGenericPointCloud * cloud
Cloud.
Definition: ecv2DLabel.h:124
ccPointPropertiesDlg::exportCurrentLabel
void exportCurrentLabel()
Definition: ecvPointPropertiesDlg.cpp:177
ccPointPropertiesDlg::~ccPointPropertiesDlg
virtual ~ccPointPropertiesDlg()
Default destructor.
Definition: ecvPointPropertiesDlg.cpp:62
ccHObject::addChild
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
ccPointPickingGenericInterface::start
bool start() override
Starts process.
Definition: ecvPointPickingGenericInterface.cpp:45
ccObject::setEnabled
virtual void setEnabled(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:102
ccPointPropertiesDlg::POINT_INFO
@ POINT_INFO
Definition: ecvPointPropertiesDlg.h:55
ecvPointCloud.h
ccPointPropertiesDlg::stop
virtual void stop(bool state) override
Stops process/dialog.
Definition: ecvPointPropertiesDlg.cpp:107
ccPointPropertiesDlg::RECT_ZONE
@ RECT_ZONE
Definition: ecvPointPropertiesDlg.h:55
ecvCommon.h
ccPointPropertiesDlg::newLabel
void newLabel(ccHObject *)
Signal emitted when a new label is created.
ecvDisplayTools::ToVtkCoordinates
static CCVector3d ToVtkCoordinates(int x, int y, int z=0)
Definition: ecvDisplayTools.cpp:1150
ccPointPickingGenericInterface
Definition: ecvPointPickingGenericInterface.h:28