VTK
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 =========================================================================*/
26 #ifndef vtkInteractorStyleDrawPolygon_h
27 #define vtkInteractorStyleDrawPolygon_h
28 
29 #include "vtkInteractionStyleModule.h" // For export macro
30 #include "vtkInteractorStyle.h"
31 
32 #include <vector> // For returning Polygon Points
33 #include "vtkVector.h" // For Polygon Points
34 
36 
38 {
39 public:
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
46  virtual void OnMouseMove();
47  virtual void OnLeftButtonDown();
48  virtual void OnLeftButtonUp();
50 
52 
53  vtkSetMacro(DrawPolygonPixels, bool);
54  vtkGetMacro(DrawPolygonPixels, bool);
55  vtkBooleanMacro(DrawPolygonPixels, bool);
57 
59  std::vector<vtkVector2i> GetPolygonPoints();
60 
61 protected:
64 
65  virtual void DrawPolygon();
66 
67  int StartPosition[2];
68  int EndPosition[2];
69  int Moving;
70 
72 
74 
75 private:
77  void operator=(const vtkInteractorStyleDrawPolygon&); // Not implemented
78 
79  class vtkInternal;
80  vtkInternal* Internal;
81 };
82 
83 #endif
virtual void OnLeftButtonDown()
draw polygon during mouse move
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
#define VTKINTERACTIONSTYLE_EXPORT
void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
dynamic, self-adjusting array of unsigned char
provide event-driven interface to the rendering window (defines trackball mode)
virtual void OnMouseMove()