LVRInteractorStylePolygonPick.hpp
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: LVRInteractorStylePolygonPick.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
33 #ifndef LVRInteractorStylePolygonPick_h
34 #define LVRInteractorStylePolygonPick_h
35 
36 #include "vtkInteractionStyleModule.h" // For export macro
37 #include "vtkInteractorStyleTrackballCamera.h"
38 
39 #include "vtkVector.h"
40 #include <vector>
41 class vtkUnsignedCharArray;
42 
43 class VTKINTERACTIONSTYLE_EXPORT LVRInteractorStylePolygonPick
44  : public vtkInteractorStyleTrackballCamera
45 {
46 public:
47  static LVRInteractorStylePolygonPick* New();
48  vtkTypeMacro(LVRInteractorStylePolygonPick, vtkInteractorStyleTrackballCamera);
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
51  void SetLassoTool();
52  void SetPolygonTool();
53  void StartSelect();
54 
56 
59  void OnMouseMove() override;
60  void OnLeftButtonDown() override;
61  void OnLeftButtonUp() override;
62  void OnChar() override;
63  void OnKeyDown() override;
65 
66  vtkSetMacro(DrawPolygonPixels, bool);
67  vtkGetMacro(DrawPolygonPixels, bool);
68  vtkBooleanMacro(DrawPolygonPixels, bool);
69 
70  std::vector<vtkVector2i> GetPolygonPoints();
71 
72 protected:
75 
76  virtual void Pick();
77  virtual void DrawPolygon();
78 
79  int StartPosition[2];
80  int EndPosition[2];
81 
82  int Moving;
83  bool firstPoint = true;
84 
85  vtkUnsignedCharArray* PixelArray;
86 
89  bool lassoToolSelected = true;
90 
91 private:
93  void operator=(const LVRInteractorStylePolygonPick&) = delete;
94 
95  class vtkInternal;
97 };
98 
99 #endif
LVRInteractorStylePolygonPick::PixelArray
vtkUnsignedCharArray * PixelArray
Definition: LVRInteractorStylePolygonPick.hpp:85
LVRInteractorStylePolygonPick::DrawPolygonPixels
bool DrawPolygonPixels
Definition: LVRInteractorStylePolygonPick.hpp:88
LVRInteractorStylePolygonPick::Moving
int Moving
Definition: LVRInteractorStylePolygonPick.hpp:82
LVRInteractorStylePolygonPick
Like TrackBallCamera, but this can pick props underneath a rubber band selection rectangle.
Definition: LVRInteractorStylePolygonPick.hpp:43
LVRInteractorStylePolygonPick::vtkInternal
Definition: LVRInteractorStylePolygonPick.cpp:36
LVRInteractorStylePolygonPick::Internal
vtkInternal * Internal
Definition: LVRInteractorStylePolygonPick.hpp:95
LVRInteractorStylePolygonPick::CurrentMode
int CurrentMode
Definition: LVRInteractorStylePolygonPick.hpp:87


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24