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