ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvAnimationParamDlg.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 "ecvOverlayDialog.h"
12 #include "ecvPickingListener.h"
13 
14 // CV_DB_LIB
15 #include <ecvGLMatrix.h>
16 #include <ecvViewportParameters.h>
17 
18 // system
19 #include <map>
20 
21 class QMdiSubWindow;
22 class ccHObject;
23 class ccPickingHub;
24 class AnimationDialogInternal;
25 class MainWindow;
26 
29  Q_OBJECT
30 
31 public:
33  explicit ecvAnimationParamDlg(QWidget* parent,
34  MainWindow* app,
35  ccPickingHub* pickingHub);
36 
38  ~ecvAnimationParamDlg() override;
39 
41 
42  // inherited from ccOverlayDialog
43  bool start() override;
44  bool linkWith(QWidget* win) override;
45 
46  // inherited from ccPickingListener
47  void onItemPicked(const PickedItem& pi) override;
48 
49 public:
51  double getRotationAngle() const;
52  bool isSavingViewport() const;
53  void doCompute();
54  inline MainWindow* getMainWindow() { return m_app; }
55 
56 public slots:
57 
59  void linkWith(QMdiSubWindow* qWin);
60 
62  void updateRotationAxisPoint(AxisType axisType, const CCVector3d& P);
63 
65  void startAnimation();
66 
67  void enableListener(bool state);
68  void updateAxisStartToolState(bool state);
69  void updateAxisEndToolState(bool state);
70  void processPickedItem(ccHObject*, unsigned, int, int, const CCVector3&);
71 
72 private slots:
73 
74  void angleStep();
75  void reset();
76  void onClose() { reset(); }
77  void enablePickRotationAxis(bool state);
78 
79 protected:
81  void initWith(QWidget* win);
82 
85 
88 
89 private:
90  AnimationDialogInternal* Internal;
91 };
#define slots
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Generic overlay dialog interface.
Point/triangle picking hub.
Definition: ecvPickingHub.h:29
Point/triangle picking listener interface.
Dialog to interactively edit the camera pose parameters.
void updateRotationAxisPoint(AxisType axisType, const CCVector3d &P)
Updates dialog values with axis point.
bool start() override
Starts process.
MainWindow * getMainWindow()
CCVector3d getRotationAxis() const
ecvViewportParameters viewportParamsHistory
void startAnimation()
Start animation.
void initWith(QWidget *win)
Inits dialog values with specified window.
void onItemPicked(const PickedItem &pi) override
Method called whenever an item is picked.
ecvAnimationParamDlg(QWidget *parent, MainWindow *app, ccPickingHub *pickingHub)
Default constructor.
void updateAxisStartToolState(bool state)
void enableListener(bool state)
bool linkWith(QWidget *win) override
Links the overlay dialog with a MDI window.
void updateAxisEndToolState(bool state)
ccPickingHub * m_pickingHub
Picking hub.
void processPickedItem(ccHObject *, unsigned, int, int, const CCVector3 &)
~ecvAnimationParamDlg() override
Destructor.
Standard parameters for GL displays/viewports.