ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
CustomVtkBoxWidget.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 "qPCL.h"
11 
17 #include <vtkBoxWidget.h>
18 
19 class QPCL_ENGINE_LIB_API CustomVtkBoxWidget : public vtkBoxWidget {
20 public:
21  static CustomVtkBoxWidget *New();
22 
23  vtkTypeMacro(CustomVtkBoxWidget, vtkBoxWidget);
24 
25  virtual void Translate(double *p1, double *p2) override;
26  virtual void Scale(double *p1, double *p2, int X, int Y) override;
27  virtual void Rotate(
28  int X, int Y, double *p1, double *p2, double *vpn) override;
29 
30  void SetTranslateXEnabled(bool state) { m_translateX = state; }
31  void SetTranslateYEnabled(bool state) { m_translateY = state; }
32  void SetTranslateZEnabled(bool state) { m_translateZ = state; }
33  void SetRotateXEnabled(bool state) { m_rotateX = state; }
34  void SetRotateYEnabled(bool state) { m_rotateY = state; }
35  void SetRotateZEnabled(bool state) { m_rotateZ = state; }
36  void SetScaleEnabled(bool state) { m_scale = state; }
37 
38 private:
39  bool m_translateX = true;
40  bool m_translateY = true;
41  bool m_translateZ = true;
42  bool m_rotateX = true;
43  bool m_rotateY = true;
44  bool m_rotateZ = true;
45  bool m_scale = true;
46 };
cloudViewer::t::geometry::Transform
void Transform(benchmark::State &state, const core::Device &device)
Definition: PointCloud.cpp:127
CustomVtkBoxWidget::SetTranslateXEnabled
void SetTranslateXEnabled(bool state)
Definition: CustomVtkBoxWidget.h:30
CustomVtkBoxWidget
The CustomVtkBoxWidget class CustomVtkBoxWidget restricts the transformation.
Definition: CustomVtkBoxWidget.h:19
CustomVtkBoxWidget::Rotate
virtual void Rotate(int X, int Y, double *p1, double *p2, double *vpn) override
Definition: CustomVtkBoxWidget.cpp:90
qPCL.h
size
int size
Definition: FileIOFactory.cpp:130
CustomVtkBoxWidget::SetTranslateZEnabled
void SetTranslateZEnabled(bool state)
Definition: CustomVtkBoxWidget.h:32
CustomVtkBoxWidget::Translate
virtual void Translate(double *p1, double *p2) override
Definition: CustomVtkBoxWidget.cpp:27
vtkStandardNewMacro
vtkStandardNewMacro(CustomVtkBoxWidget)
cloudViewer::ml::contrib::Cross
CLOUDVIEWER_HOST_DEVICE float Cross(const Point &a, const Point &b)
Definition: IoUImpl.h:39
CustomVtkBoxWidget.h
CustomVtkBoxWidget::SetRotateYEnabled
void SetRotateYEnabled(bool state)
Definition: CustomVtkBoxWidget.h:34
QPCL_ENGINE_LIB_API
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15
fgr::Points
std::vector< Eigen::Vector3f > Points
Definition: FastGlobalRegistration.h:13
CustomVtkBoxWidget::SetRotateXEnabled
void SetRotateXEnabled(bool state)
Definition: CustomVtkBoxWidget.h:33
CustomVtkBoxWidget::SetRotateZEnabled
void SetRotateZEnabled(bool state)
Definition: CustomVtkBoxWidget.h:35
X
void * X
Definition: SmallVector.cpp:45
CustomVtkBoxWidget::SetScaleEnabled
void SetScaleEnabled(bool state)
Definition: CustomVtkBoxWidget.h:36
CustomVtkBoxWidget::Scale
virtual void Scale(double *p1, double *p2, int X, int Y) override
Definition: CustomVtkBoxWidget.cpp:55
CustomVtkBoxWidget::SetTranslateYEnabled
void SetTranslateYEnabled(bool state)
Definition: CustomVtkBoxWidget.h:31