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:
22 
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 };
void * X
Definition: SmallVector.cpp:45
The CustomVtkBoxWidget class CustomVtkBoxWidget restricts the transformation.
void SetTranslateYEnabled(bool state)
void SetTranslateXEnabled(bool state)
void SetRotateXEnabled(bool state)
static CustomVtkBoxWidget * New()
vtkTypeMacro(CustomVtkBoxWidget, vtkBoxWidget)
void SetScaleEnabled(bool state)
void SetTranslateZEnabled(bool state)
void SetRotateZEnabled(bool state)
void SetRotateYEnabled(bool state)
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15