cisst-saw
Loading...
Searching...
No Matches
vctQtWidgetRotation.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5 Author(s): Zihan Chen, Anton Deguet
6 Created on: 2013-03-20
7
8 (C) Copyright 2013-2020 Johns Hopkins University (JHU), All Rights Reserved.
9
10--- begin cisst license - do not edit ---
11
12This software is provided "as is" under an open source license, with
13no warranty. The complete license can be found in license.txt and
14http://www.cisst.org/cisst/license.txt.
15
16--- end cisst license ---
17*/
18
19
20#ifndef _vctQtWidgetRotation_h
21#define _vctQtWidgetRotation_h
22
23// cisst include
27
28class QVBoxLayout;
29
30// Always include last
32
33
41{
42 Q_OBJECT;
43
44public:
47
48 void SetValue(const vctMatRot3 & rotation);
49
50protected:
51 void ResetOrientation(void);
52 void mouseMoveEvent(QMouseEvent * event);
53 void mouseReleaseEvent(QMouseEvent * event);
54 void keyPressEvent(QKeyEvent * event);
55
56 void initializeGL(void);
57 void paintGL(void);
58 void resizeGL(int width, int height);
59
63};
64
65
68{
69 Q_OBJECT;
70
71 public:
76
80
82
86 template <class _containerType>
88 this->Rotation.FromRaw(rotation);
89 this->UpdateCurrentWidget();
90 }
91
97 void SetDisplayMode(const DisplayModeType displayMode);
98
99 inline void SetPrismaticRevoluteFactors(const double & CMN_UNUSED(prismatic), const double & revolute) {
100 mRevoluteFactor = revolute;
101 this->UpdateCurrentWidget();
102 }
103
104 protected slots:
106 void ShowContextMenu(const QPoint & position);
107
108 protected:
113
119
122
123 // Matrix
125
126 // Axis Angle
130
131 // Quaternion
133
134 // Euler Angles (in degrees)
137
138 // Visualization
140
141 // current widget
142 QWidget * CurrentWidget;
143 QVBoxLayout * Layout;
144
145 // conversion factor
147};
148
149#endif // _vctQtWidgetRotation_h
Define a rotation matrix for a space of dimension 3.
Definition vctMatrixRotation3ConstBase.h:56
Definition vctQtWidgetDynamicMatrix.h:35
vctQtWidgetRotationDoubleRead(const DisplayModeType displayMode=MATRIX_WIDGET)
~vctQtWidgetRotationDoubleRead(void)
Definition vctQtWidgetRotation.h:81
QWidget * AxisAngleWidget
Definition vctQtWidgetRotation.h:129
void SetDisplayMode(const DisplayModeType displayMode)
DisplayModeType
Definition vctQtWidgetRotation.h:74
@ EULERZYX_WIDGET
Definition vctQtWidgetRotation.h:75
@ UNDEFINED_WIDGET
Definition vctQtWidgetRotation.h:74
@ QUATERNION_WIDGET
Definition vctQtWidgetRotation.h:74
@ AXIS_ANGLE_WIDGET
Definition vctQtWidgetRotation.h:74
@ EULERZYZ_WIDGET
Definition vctQtWidgetRotation.h:75
@ MATRIX_WIDGET
Definition vctQtWidgetRotation.h:74
@ OPENGL_WIDGET
Definition vctQtWidgetRotation.h:75
vctQtWidgetDynamicVectorDoubleRead * EulerZYXWidget
Definition vctQtWidgetRotation.h:136
double mRevoluteFactor
Definition vctQtWidgetRotation.h:146
DisplayModeType DisplayMode
Definition vctQtWidgetRotation.h:112
void ShowContextMenu(const QPoint &position)
void SetValue(const vctMatrixRotation3ConstBase< _containerType > &rotation)
Definition vctQtWidgetRotation.h:87
vctQtWidgetRotationOpenGL * OpenGLWidget
Definition vctQtWidgetRotation.h:139
vctQtWidgetDynamicVectorDoubleRead * AxisWidget
Definition vctQtWidgetRotation.h:127
QWidget * CurrentWidget
Definition vctQtWidgetRotation.h:142
vctMatRot3 Rotation
Definition vctQtWidgetRotation.h:121
vctQtWidgetDynamicVectorDoubleRead * AngleWidget
Definition vctQtWidgetRotation.h:128
vctQtWidgetDynamicVectorDoubleRead * QuaternionWidget
Definition vctQtWidgetRotation.h:132
vctQtWidgetDynamicMatrixDoubleRead * MatrixWidget
Definition vctQtWidgetRotation.h:124
QVBoxLayout * Layout
Definition vctQtWidgetRotation.h:143
void SetPrismaticRevoluteFactors(const double &CMN_UNUSED(prismatic), const double &revolute)
Definition vctQtWidgetRotation.h:99
vctQtWidgetDynamicVectorDoubleRead * EulerZYZWidget
Definition vctQtWidgetRotation.h:135
Definition vctQtWidgetRotation.h:41
void mouseMoveEvent(QMouseEvent *event)
vct3 mRotation
Definition vctQtWidgetRotation.h:60
vctInt2 mStartMousePosition
Definition vctQtWidgetRotation.h:62
void SetValue(const vctMatRot3 &rotation)
vctQuatRot3 mDeltaOrientation
Definition vctQtWidgetRotation.h:61
void resizeGL(int width, int height)
void mouseReleaseEvent(QMouseEvent *event)
~vctQtWidgetRotationOpenGL(void)
Definition vctQtWidgetRotation.h:46
vctQuatRot3 mCurrentOrientation
Definition vctQtWidgetRotation.h:61
void keyPressEvent(QKeyEvent *event)
#define CISST_EXPORT
Definition cmnExportMacros.h:50
#define CMN_UNUSED(argument)
Definition cmnPortability.h:497
size_type height() const
Definition vctDynamicConstMatrixBase.h:248
size_type width() const
Definition vctDynamicConstMatrixBase.h:253
Macros to export the symbols of cisstVectorQt (in a Dll).
vctFixedSizeVector< double, 3 > vct3
Definition vctFixedSizeVectorTypes.h:46
vctFixedSizeVector< int, 2 > vctInt2
Definition vctFixedSizeVectorTypes.h:143
Forward declarations and #define for cisstVector.
vctQtWidgetDynamicVectorReadFloating< double > vctQtWidgetDynamicVectorDoubleRead
Definition vctForwardDeclarationsQt.h:39
QGLWidget vctQtOpenGLBaseWidget
Definition vctForwardDeclarationsQt.h:31
Typedef for different transformations.
vctMatrixRotation3< double, VCT_ROW_MAJOR > vctMatRot3
Definition vctTransformationTypes.h:107
vctQuaternionRotation3< double > vctQuatRot3
Definition vctTransformationTypes.h:67