VTK  9.2.6
vtkInteractorStyleDrawPolygon.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkInteractorStyleDrawPolygon.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=========================================================================*/
27#ifndef vtkInteractorStyleDrawPolygon_h
28#define vtkInteractorStyleDrawPolygon_h
29
30#include "vtkInteractionStyleModule.h" // For export macro
31#include "vtkInteractorStyle.h"
32
33#include "vtkVector.h" // For Polygon Points
34#include <vector> // For returning Polygon Points
35
37
38class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleDrawPolygon : public vtkInteractorStyle
39{
40public:
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
49 void OnMouseMove() override;
50 void OnLeftButtonDown() override;
51 void OnLeftButtonUp() override;
53
55
58 vtkSetMacro(DrawPolygonPixels, bool);
59 vtkGetMacro(DrawPolygonPixels, bool);
60 vtkBooleanMacro(DrawPolygonPixels, bool);
62
66 std::vector<vtkVector2i> GetPolygonPoints();
67
68protected:
71
72 virtual void DrawPolygon();
73
74 int StartPosition[2];
75 int EndPosition[2];
76 int Moving;
77
79
81
82private:
84 void operator=(const vtkInteractorStyleDrawPolygon&) = delete;
85
86 class vtkInternal;
87 vtkInternal* Internal;
88};
89
90#endif
a simple class to control print indentation
Definition vtkIndent.h:40
void OnLeftButtonUp() override
Event bindings.
void OnMouseMove() override
Event bindings.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
std::vector< vtkVector2i > GetPolygonPoints()
Get the current polygon points in display units.
~vtkInteractorStyleDrawPolygon() override
static vtkInteractorStyleDrawPolygon * New()
void OnLeftButtonDown() override
Event bindings.
provide event-driven interface to the rendering window (defines trackball mode)
dynamic, self-adjusting array of unsigned char