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
vtkInteractorStyleDrawPolygon::GetPolygonPoints
std::vector< vtkVector2i > GetPolygonPoints()
vtkInteractorStyle.h
vtkInteractorStyleDrawPolygon::OnLeftButtonDown
virtual void OnLeftButtonDown()
vtkInteractorStyleDrawPolygon::DrawPolygon
virtual void DrawPolygon()
vtkUnsignedCharArray
dynamic, self-adjusting array of unsigned char
Definition: vtkUnsignedCharArray.h:49
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkVector.h
vtkInteractorStyleDrawPolygon::PixelArray
vtkUnsignedCharArray * PixelArray
Definition: vtkInteractorStyleDrawPolygon.h:73
VTKINTERACTIONSTYLE_EXPORT
#define VTKINTERACTIONSTYLE_EXPORT
Definition: vtkInteractionStyleModule.h:15
vtkInteractorStyleDrawPolygon::~vtkInteractorStyleDrawPolygon
~vtkInteractorStyleDrawPolygon()
vtkInteractorStyleDrawPolygon
draw polygon during mouse move
Definition: vtkInteractorStyleDrawPolygon.h:38
vtkInteractionStyleModule.h
vtkInteractorStyleDrawPolygon::Moving
int Moving
Definition: vtkInteractorStyleDrawPolygon.h:69
vtkInteractorStyleDrawPolygon::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkInteractorStyleDrawPolygon::OnLeftButtonUp
virtual void OnLeftButtonUp()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:136
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkInteractorStyleDrawPolygon::OnMouseMove
virtual void OnMouseMove()
vtkInteractorStyleDrawPolygon::vtkInteractorStyleDrawPolygon
vtkInteractorStyleDrawPolygon()
vtkInteractorStyleDrawPolygon::New
static vtkInteractorStyleDrawPolygon * New()
vtkInteractorStyleDrawPolygon::DrawPolygonPixels
bool DrawPolygonPixels
Definition: vtkInteractorStyleDrawPolygon.h:71