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 };
std::string filename
#define CV_DB_LIB_API
Definition: CV_db.h:15
ccGLMatrixTpl< float > & operator+=(const ccGLMatrixTpl< float > &mat)
(in place) Addition operator
bool fromFile(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
ccGLMatrixTpl< float > transposed() const
Returns transposed matrix.
bool toFile(QFile &out, short dataVersion) const override
ccGLMatrixTpl< float > & operator-=(const ccGLMatrixTpl< float > &mat)
(in place) Difference operator
ccGLMatrixTpl< float > operator*(const ccGLMatrixTpl< float > &mat) const
Multiplication by a matrix operator.
static ccGLMatrixTpl Interpolate(float coef, const ccGLMatrixTpl< float > &glMat1, const ccGLMatrixTpl< float > &glMat2)
Interpolates two matrices at relative position 'coef'.
virtual bool fromAsciiFile(QString filename)
Loads matrix from an ASCII file.
ccGLMatrixTpl< float > inverse() const
Returns inverse transformation.
short minimumFileVersion() const override
ccGLMatrixTpl< float > & operator*=(const ccGLMatrixTpl< float > &mat)
(in place) Multiplication operator
virtual bool toAsciiFile(QString filename, int precision=12) const
Saves matrix to an ASCII file.
Float version of ccGLMatrixTpl.
Definition: ecvGLMatrix.h:19
double getIndex() const
Returns associated index (e.g. timestamp)
void setIndex(double index)
Sets associated index (e.g. timestamp)
bool isSerializable() const override
Returns whether object is serializable of not.
double m_index
Associated index (e.g. timestamp)