ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvIndexedTransformation.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 "ecvGLMatrix.h"
12 
16 public:
18 
22 
24 
27  ccIndexedTransformation(const ccGLMatrix& matrix);
28 
30 
33  ccIndexedTransformation(const ccGLMatrix& matrix, double index);
34 
37 
39  inline double getIndex() const { return m_index; }
40 
42  inline void setIndex(double index) { m_index = index; }
43 
45 
51  double interpIndex,
52  const ccIndexedTransformation& trans1,
53  const ccIndexedTransformation& trans2);
54 
57 
59 
62 
64 
68 
71 
73 
76 
78 
81 
82  // inherited from ccGLMatrix
83  virtual bool toAsciiFile(QString filename, int precision = 12) const;
84  virtual bool fromAsciiFile(QString filename);
85 
86  // inherited from ccSerializableObject
87  bool isSerializable() const override { return true; }
88  bool toFile(QFile& out, short dataVersion) const override;
89  short minimumFileVersion() const override;
90  bool fromFile(QFile& in,
91  short dataVersion,
92  int flags,
93  LoadedIDMap& oldToNewIDMap) override;
94 
95 protected:
97  double m_index;
98 };
ccGLMatrixTpl< float >::toFile
bool toFile(QFile &out, short dataVersion) const override
Definition: ecvGLMatrixTpl.h:1405
filename
std::string filename
Definition: PointCloudIO.cpp:47
ccGLMatrixTpl< float >::inverse
ccGLMatrixTpl< float > inverse() const
Returns inverse transformation.
Definition: ecvGLMatrixTpl.h:1325
ccIndexedTransformation::getIndex
double getIndex() const
Returns associated index (e.g. timestamp)
Definition: ecvIndexedTransformation.h:39
ccGLMatrixTpl< float >::Interpolate
static ccGLMatrixTpl Interpolate(float coef, const ccGLMatrixTpl< float > &glMat1, const ccGLMatrixTpl< float > &glMat2)
Interpolates two matrices at relative position 'coef'.
Definition: ecvGLMatrixTpl.h:201
ccGLMatrixTpl< float >::fromFile
bool fromFile(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Definition: ecvGLMatrixTpl.h:1427
ccIndexedTransformation::setIndex
void setIndex(double index)
Sets associated index (e.g. timestamp)
Definition: ecvIndexedTransformation.h:42
ccGLMatrixTpl< float >::toAsciiFile
virtual bool toAsciiFile(QString filename, int precision=12) const
Saves matrix to an ASCII file.
Definition: ecvGLMatrixTpl.h:520
ccGLMatrixTpl< float >::operator+=
ccGLMatrixTpl< float > & operator+=(const ccGLMatrixTpl< float > &mat)
(in place) Addition operator
Definition: ecvGLMatrixTpl.h:983
ccGLMatrixTpl< float >::operator*=
ccGLMatrixTpl< float > & operator*=(const ccGLMatrixTpl< float > &mat)
(in place) Multiplication operator
Definition: ecvGLMatrixTpl.h:997
Vector3Tpl< PointCoordinateType >
ccIndexedTransformation::m_index
double m_index
Associated index (e.g. timestamp)
Definition: ecvIndexedTransformation.h:97
ccIndexedTransformation::isSerializable
bool isSerializable() const override
Returns whether object is serializable of not.
Definition: ecvIndexedTransformation.h:87
ccGLMatrixTpl< float >::minimumFileVersion
short minimumFileVersion() const override
Definition: ecvGLMatrixTpl.h:1422
ccGLMatrix
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
ccGLMatrixTpl< float >::operator-=
ccGLMatrixTpl< float > & operator-=(const ccGLMatrixTpl< float > &mat)
(in place) Difference operator
Definition: ecvGLMatrixTpl.h:990
ccGLMatrixTpl< float >::fromAsciiFile
virtual bool fromAsciiFile(QString filename)
Loads matrix from an ASCII file.
Definition: ecvGLMatrixTpl.h:538
CV_DB_LIB_API
#define CV_DB_LIB_API
Definition: CV_db.h:15
ccGLMatrixTpl< float >::transposed
ccGLMatrixTpl< float > transposed() const
Returns transposed matrix.
Definition: ecvGLMatrixTpl.h:1286
ecvGLMatrix.h
ccGLMatrixTpl< float >::operator*
ccGLMatrixTpl< float > operator*(const ccGLMatrixTpl< float > &mat) const
Multiplication by a matrix operator.
Definition: ecvGLMatrixTpl.h:947
ccIndexedTransformation
Definition: ecvIndexedTransformation.h:15