ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvIndexedTransformationBuffer.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 "ecvBBox.h"
12 #include "ecvHObject.h"
14 
15 // system
16 #include <float.h>
17 
20  : public ccHObject,
21  public std::vector<ccIndexedTransformation> {
22 public:
24  ccIndexedTransformationBuffer(QString name = QString("Trans. buffer"));
27 
28  // inherited from ccHObject
29  virtual CV_CLASS_ENUM getClassID() const override {
31  }
32  virtual bool isSerializable() const override { return true; }
33 
35 
37  void sort();
38 
40 
52  bool findNearest(double index,
53  const ccIndexedTransformation*& trans1,
54  const ccIndexedTransformation*& trans2,
55  size_t* trans1IndexInBuffer = 0,
56  size_t* trans2IndexInBuffer = 0) const;
57 
60 
69  bool getInterpolatedTransformation(
70  double index,
72  double maxIndexDistForInterpolation = DBL_MAX) const;
73 
76  bool triherdonsShown() { return m_showTrihedrons; }
79  void showTriherdons(bool state) { m_showTrihedrons = state; }
80 
82  float triherdonsDisplayScale() { return m_trihedronsScale; }
84  void setTriherdonsDisplayScale(float scale) { m_trihedronsScale = scale; }
85 
88  bool isPathShonwAsPolyline() { return m_showAsPolyline; }
91  void showPathAsPolyline(bool state) { m_showAsPolyline = state; }
92 
94 
96  void invalidateBoundingBox();
97 
98  // Inherited from ccHObject
99  virtual ccBBox getOwnBB(bool withGLFeatures = false) override;
100 
101 protected:
102  // inherited from ccHObject
103  bool toFile_MeOnly(QFile& out, short dataVersion) const override;
104  short minimumFileVersion_MeOnly() const override;
105  bool fromFile_MeOnly(QFile& in,
106  short dataVersion,
107  int flags,
108  LoadedIDMap& oldToNewIDMap) override;
109 
112 
115 
122 };
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
Definition: CVTypes.h:97
#define CV_DB_LIB_API
Definition: CV_db.h:15
std::string name
Bounding box structure.
Definition: ecvBBox.h:25
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
virtual short minimumFileVersion_MeOnly() const
virtual bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap)
Loads own object data.
virtual bool toFile_MeOnly(QFile &out, short dataVersion) const
Save own object data.
virtual ccBBox getOwnBB(bool withGLFeatures=false)
Returns the entity's own bounding-box.
Definition: ecvHObject.cpp:757
virtual CV_CLASS_ENUM getClassID() const override
Returns class ID.
size_t m_bBoxValidSize
Bounding box last 'validity' size.
bool m_showTrihedrons
Whether trihedrons should be displayed or not.
virtual bool isSerializable() const override
Returns whether object is serializable of not.
float m_trihedronsScale
Trihedrons display scale.
bool m_showAsPolyline
Whether the path should be displayed as a polyline or not.
void setTriherdonsDisplayScale(float scale)
[Display option] Sets trihedron display size
float triherdonsDisplayScale()
[Display option] Returns trihedron display size
@ TRANS_BUFFER
Definition: CVTypes.h:144