ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvApplyTransformationDlg.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 #include <ui_applyTransformationDlg.h>
11 
12 // CV_DB_LIB
13 #include <ecvGLMatrix.h>
14 
16 class ccApplyTransformationDlg : public QDialog,
17  public Ui::ApplyTransformationDialog {
18  Q_OBJECT
19 
20 public:
22  explicit ccApplyTransformationDlg(QWidget* parent = 0);
23 
26 
27 protected slots:
28 
31 
34  void onMatrixTextChange();
35 
37  void onRotAngleValueChanged(double);
39  void onEulerValueChanged(double);
40 
42  void loadFromASCIIFile();
44  void loadFromClipboard();
46  void initFromDipAndDipDir();
47 
49  void buttonClicked(QAbstractButton*);
50 
51 protected:
53  void updateAll(const ccGLMatrix& mat,
54  bool textForm = true,
55  bool axisAngleForm = true,
56  bool eulerForm = true);
57 };
ecvApplyTransformationDlg.h
ecvAskTwoDoubleValuesDlg.h
ccApplyTransformationDlg::loadFromASCIIFile
void loadFromASCIIFile()
Loads matrix from ASCII file.
Definition: ecvApplyTransformationDlg.cpp:295
QtCompat.h
cloudViewer::BoundingBoxTpl::getCenter
Vector3Tpl< T > getCenter() const
Returns center.
Definition: BoundingBox.h:164
Tuple3Tpl::x
Type x
Definition: CVGeom.h:137
ccApplyTransformationDlg::updateAll
void updateAll(const ccGLMatrix &mat, bool textForm=true, bool axisAngleForm=true, bool eulerForm=true)
Updates all forms with a given matrix.
Definition: ecvApplyTransformationDlg.cpp:190
ccApplyTransformationDlg::onEulerValueChanged
void onEulerValueChanged(double)
Updates dialog when a component of the euleur form changes.
Definition: ecvApplyTransformationDlg.cpp:170
CVConst.h
ccGLMatrixd
Double version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:56
ccBBox
Bounding box structure.
Definition: ecvBBox.h:25
ccGLMatrixTpl::setTranslation
void setTranslation(const Vector3Tpl< float > &Tr)
Sets translation (float version)
Definition: ecvGLMatrixTpl.h:836
DipDirTransformationDialog::DipDirTransformationDialog
DipDirTransformationDialog(QWidget *parent=0)
Definition: ecvApplyTransformationDlg.cpp:46
QtCompatRegExp
QRegularExpression QtCompatRegExp
Definition: QtCompat.h:170
ecvNormalVectors.h
ccApplyTransformationDlg::checkMatrixValidityAndAccept
void checkMatrixValidityAndAccept()
Checks matrix validity and 'accept' dialog if ok.
Definition: ecvApplyTransformationDlg.cpp:274
s_inverseMatrix
static bool s_inverseMatrix
Definition: ecvApplyTransformationDlg.cpp:37
ccHObject::Container
std::vector< ccHObject * > Container
Standard instances container (for children, etc.)
Definition: ecvHObject.h:337
MainWindow::TheInstance
static MainWindow * TheInstance()
Returns the unique instance of this object.
Definition: MainWindow.cpp:2037
CCVector3
Vector3Tpl< PointCoordinateType > CCVector3
Default 3D Vector.
Definition: CVGeom.h:798
ccNormalVectors::ConvertDipAndDipDirToNormal
static CCVector3 ConvertDipAndDipDirToNormal(PointCoordinateType dip_deg, PointCoordinateType dipDir_deg, bool upward=true)
Definition: ecvNormalVectors.cpp:892
ccApplyTransformationDlg::loadFromClipboard
void loadFromClipboard()
Loads matrix from clipboard ("paste")
Definition: ecvApplyTransformationDlg.cpp:320
ccApplyTransformationDlg
Dialog to input a 4x4 matrix.
Definition: ecvApplyTransformationDlg.h:16
ccApplyTransformationDlg::onMatrixTextChange
void onMatrixTextChange()
Definition: ecvApplyTransformationDlg.cpp:132
ecvFileUtils::defaultDocPath
QString defaultDocPath()
Shortcut for getting the documents location path.
Definition: ecvFileUtils.h:30
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
ccApplyTransformationDlg::onRotAngleValueChanged
void onRotAngleValueChanged(double)
Updates dialog when a component of the rotation axis/angle form changes.
Definition: ecvApplyTransformationDlg.cpp:151
slots
#define slots
Definition: PythonPlugin.cpp:25
MainWindow::getSelectedEntities
const ccHObject::Container & getSelectedEntities() const override
Returns currently selected entities ("read only")
Definition: MainWindow.h:238
DipDirTransformationDialog
Dialog to define a dip / dip dir. transformation.
Definition: ecvApplyTransformationDlg.cpp:41
Vector3Tpl< PointCoordinateType >
ccApplyTransformationDlg::getTransformation
ccGLMatrixd getTransformation() const
Returns input matrix.
Definition: ecvApplyTransformationDlg.cpp:259
Ui
Definition: sfEditDlg.h:16
ccGLMatrixTpl::initFromParameters
void initFromParameters(T alpha_rad, const Vector3Tpl< T > &axis3D, const Vector3Tpl< T > &t3D)
Inits transformation from a rotation axis, an angle and a translation.
Definition: ecvGLMatrixTpl.h:648
cloudViewer::BoundingBoxTpl::isValid
bool isValid() const
Returns whether bounding box is valid or not.
Definition: BoundingBox.h:203
ecvFileUtils.h
s_lastMatrix
static QString s_lastMatrix("1.00000000 0.00000000 0.00000000 0.00000000\n0.00000000 1.00000000 " "0.00000000 0.00000000\n0.00000000 0.00000000 1.00000000 " "0.00000000\n0.00000000 0.00000000 0.00000000 1.00000000")
ecvPersistentSettings.h
ccApplyTransformationDlg::ccApplyTransformationDlg
ccApplyTransformationDlg(QWidget *parent=0)
Default constructor.
Definition: ecvApplyTransformationDlg.cpp:51
Tuple3Tpl::z
Type z
Definition: CVGeom.h:137
ccGLMatrixTpl::getParameters
void getParameters(T &alpha_rad, Vector3Tpl< T > &axis3D, Vector3Tpl< T > &t3D) const
Definition: ecvGLMatrixTpl.h:741
cloudViewer::DegreesToRadians
float DegreesToRadians(int degrees)
Convert degrees to radians.
Definition: CVMath.h:98
ccHObject::getBB_recursive
virtual ccBBox getBB_recursive(bool withGLFeatures=false, bool onlyEnabledChildren=true)
Returns the bounding-box of this entity and it's children.
Definition: ecvHObject.cpp:759
s_currentFormIndex
static int s_currentFormIndex
Definition: ecvApplyTransformationDlg.cpp:38
ccGLMatrix
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
MainWindow.h
CVLog::Warning
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
ccGLMatrixTpl::fromAsciiFile
virtual bool fromAsciiFile(QString filename)
Loads matrix from an ASCII file.
Definition: ecvGLMatrixTpl.h:538
ecvPS::LoadFile
static const QString LoadFile()
Definition: ecvPersistentSettings.h:18
ccGLMatrixTpl::invert
void invert()
Inverts transformation.
Definition: ecvGLMatrixTpl.h:1294
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
ecvPS::CurrentPath
static const QString CurrentPath()
Definition: ecvPersistentSettings.h:39
Tuple3Tpl::y
Type y
Definition: CVGeom.h:137
ccApplyTransformationDlg::buttonClicked
void buttonClicked(QAbstractButton *)
Signal called when a button is clicked.
Definition: ecvApplyTransformationDlg.cpp:377
ccGLMatrixTpl< float >::FromToRotation
static ccGLMatrixTpl< float > FromToRotation(const Vector3Tpl< float > &from, const Vector3Tpl< float > &to)
Creates a transformation matrix that rotates a vector to another.
Definition: ecvGLMatrixTpl.h:230
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
ccApplyTransformationDlg::initFromDipAndDipDir
void initFromDipAndDipDir()
Inits matrix from dip / dip direction values.
Definition: ecvApplyTransformationDlg.cpp:331
ecvGLMatrix.h
ccGLMatrixTpl< float >::FromString
static ccGLMatrixTpl< float > FromString(const QString &matText, bool &success)
Converts a 'text' matrix to a ccGLMatrix.
Definition: ecvGLMatrixTpl.h:477
ccGLMatrixTpl::toString
QString toString(int precision=12, QChar separator=' ') const
Returns matrix as a string.
Definition: ecvGLMatrixTpl.h:502