![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Dialog to interactively edit the camera pose parameters. More...
#include <ecvAnimationParamDlg.h>


Public Types | |
| enum | AxisType { AXIS_START , AXIS_END } |
Public Slots | |
| void | linkWith (QMdiSubWindow *qWin) |
| Links this dialog with a given sub-window. More... | |
| void | updateRotationAxisPoint (AxisType axisType, const CCVector3d &P) |
| Updates dialog values with axis point. More... | |
| void | startAnimation () |
| Start animation. More... | |
| void | enableListener (bool state) |
| void | updateAxisStartToolState (bool state) |
| void | updateAxisEndToolState (bool state) |
| void | processPickedItem (ccHObject *, unsigned, int, int, const CCVector3 &) |
Public Member Functions | |
| ecvAnimationParamDlg (QWidget *parent, MainWindow *app, ccPickingHub *pickingHub) | |
| Default constructor. More... | |
| ~ecvAnimationParamDlg () override | |
| Destructor. More... | |
| bool | start () override |
| Starts process. More... | |
| bool | linkWith (QWidget *win) override |
| Links the overlay dialog with a MDI window. More... | |
| void | onItemPicked (const PickedItem &pi) override |
| Method called whenever an item is picked. More... | |
| CCVector3d | getRotationAxis () const |
| double | getRotationAngle () const |
| bool | isSavingViewport () const |
| void | doCompute () |
| MainWindow * | getMainWindow () |
Public Member Functions inherited from ccOverlayDialog | |
| ccOverlayDialog (QWidget *parent=nullptr, Qt::WindowFlags flags=Qt::FramelessWindowHint|Qt::Tool) | |
| Default constructor. More... | |
| ~ccOverlayDialog () override | |
| Destructor. More... | |
| virtual void | stop (bool accepted) |
| Stops process/dialog. More... | |
| void | reject () override |
| void | addOverridenShortcut (Qt::Key key) |
| bool | started () const |
| Returns whether the tool is currently started or not. More... | |
Public Member Functions inherited from ccPickingListener | |
| virtual | ~ccPickingListener ()=default |
Protected Member Functions | |
| void | initWith (QWidget *win) |
| Inits dialog values with specified window. More... | |
Protected Member Functions inherited from ccOverlayDialog | |
| bool | eventFilter (QObject *obj, QEvent *e) override |
Protected Attributes | |
| ccPickingHub * | m_pickingHub |
| Picking hub. More... | |
| MainWindow * | m_app |
| ecvViewportParameters | viewportParamsHistory |
Protected Attributes inherited from ccOverlayDialog | |
| QWidget * | m_associatedWin |
| Associated (MDI) window. More... | |
| bool | m_processing |
| Running/processing state. More... | |
| QList< int > | m_overriddenKeys |
| Overridden keys. More... | |
Additional Inherited Members | |
Signals inherited from ccOverlayDialog | |
| void | processFinished (bool accepted) |
| Signal emitted when process is finished. More... | |
| void | shortcutTriggered (int key) |
| Signal emitted when an overridden key shortcut is pressed. More... | |
| void | shown () |
| Signal emitted when a 'show' event is detected. More... | |
Protected Slots inherited from ccOverlayDialog | |
| virtual void | onLinkedWindowDeletion (QObject *object=nullptr) |
| Slot called when the linked window is deleted (calls 'onClose') More... | |
Dialog to interactively edit the camera pose parameters.
Definition at line 28 of file ecvAnimationParamDlg.h.
| Enumerator | |
|---|---|
| AXIS_START | |
| AXIS_END | |
Definition at line 40 of file ecvAnimationParamDlg.h.
|
explicit |
Default constructor.
Definition at line 39 of file ecvAnimationParamDlg.cpp.
References startAnimation(), updateAxisEndToolState(), and updateAxisStartToolState().
|
override |
Destructor.
Definition at line 72 of file ecvAnimationParamDlg.cpp.
| void ecvAnimationParamDlg::doCompute | ( | ) |
|
slot |
Definition at line 322 of file ecvAnimationParamDlg.cpp.
References ccPickingHub::addListener(), ecvDisplayTools::DEFAULT_PICKING, CVLog::Error(), ecvDisplayTools::itemPicked(), ccOverlayDialog::m_associatedWin, m_pickingHub, ecvDisplayTools::POINT_OR_TRIANGLE_PICKING, processPickedItem(), ccPickingHub::removeListener(), ecvDisplayTools::SetPickingMode(), and ecvDisplayTools::TheInstance().
Referenced by updateAxisEndToolState(), and updateAxisStartToolState().
|
inline |
Definition at line 54 of file ecvAnimationParamDlg.h.
References m_app.
Referenced by startAnimation().
| double ecvAnimationParamDlg::getRotationAngle | ( | ) | const |
Definition at line 74 of file ecvAnimationParamDlg.cpp.
Referenced by startAnimation().
| CCVector3d ecvAnimationParamDlg::getRotationAxis | ( | ) | const |
Definition at line 248 of file ecvAnimationParamDlg.cpp.
Referenced by startAnimation().
|
protected |
Inits dialog values with specified window.
Definition at line 243 of file ecvAnimationParamDlg.cpp.
Referenced by linkWith().
| bool ecvAnimationParamDlg::isSavingViewport | ( | ) | const |
Definition at line 78 of file ecvAnimationParamDlg.cpp.
Referenced by startAnimation().
|
slot |
Links this dialog with a given sub-window.
Definition at line 205 of file ecvAnimationParamDlg.cpp.
References linkWith().
|
overridevirtual |
Links the overlay dialog with a MDI window.
Warning: link can't be modified while dialog is displayed/process is running!
Reimplemented from ccOverlayDialog.
Definition at line 212 of file ecvAnimationParamDlg.cpp.
References initWith(), ccOverlayDialog::linkWith(), ccOverlayDialog::m_associatedWin, ecvDisplayTools::TheInstance(), updateAxisEndToolState(), and updateAxisStartToolState().
Referenced by linkWith().
|
overridevirtual |
Method called whenever an item is picked.
Implements ccPickingListener.
Definition at line 141 of file ecvAnimationParamDlg.cpp.
References Vector3Tpl< double >::fromArray(), ccOverlayDialog::m_associatedWin, m_pickingHub, ccPickingListener::PickedItem::P3D, Tuple3Tpl< Type >::u, updateAxisEndToolState(), updateAxisStartToolState(), and updateRotationAxisPoint().
|
slot |
Definition at line 164 of file ecvAnimationParamDlg.cpp.
References Vector3Tpl< double >::fromArray(), ccOverlayDialog::m_associatedWin, Tuple3Tpl< Type >::u, updateAxisEndToolState(), updateAxisStartToolState(), and updateRotationAxisPoint().
Referenced by enableListener().
|
overridevirtual |
Starts process.
Reimplemented from ccOverlayDialog.
Definition at line 192 of file ecvAnimationParamDlg.cpp.
References ecvDisplayTools::GetViewportParameters(), ccOverlayDialog::m_processing, ccOverlayDialog::start(), and viewportParamsHistory.
|
slot |
Start animation.
Definition at line 82 of file ecvAnimationParamDlg.cpp.
References MainWindow::doActionSaveViewportAsCamera(), getMainWindow(), getRotationAngle(), getRotationAxis(), ecvDisplayTools::GlHeight(), ecvDisplayTools::GlWidth(), isSavingViewport(), ecvDisplayTools::RotateWithAxis(), and cloudViewer::utility::Sleep().
Referenced by ecvAnimationParamDlg().
|
slot |
Definition at line 357 of file ecvAnimationParamDlg.cpp.
References enableListener().
Referenced by ecvAnimationParamDlg(), linkWith(), onItemPicked(), and processPickedItem().
|
slot |
Definition at line 350 of file ecvAnimationParamDlg.cpp.
References enableListener().
Referenced by ecvAnimationParamDlg(), linkWith(), onItemPicked(), and processPickedItem().
|
slot |
Updates dialog values with axis point.
Definition at line 264 of file ecvAnimationParamDlg.cpp.
References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by onItemPicked(), and processPickedItem().
|
protected |
Definition at line 86 of file ecvAnimationParamDlg.h.
Referenced by getMainWindow().
|
protected |
Picking hub.
Definition at line 84 of file ecvAnimationParamDlg.h.
Referenced by enableListener(), and onItemPicked().
|
protected |
Definition at line 87 of file ecvAnimationParamDlg.h.
Referenced by start().