Evita  0.16
evInteractorStyle2D.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evInteractorStyle2D_h
25 #define __evInteractorStyle2D_h
26 
27 
28 #include "vtkInteractorStyleImage.h"
29 #include "vtkPoints.h"
30 #include "vtkCellArray.h"
31 #include "vtkFloatArray.h"
32 #include "vtkPolyData.h"
33 #include "vtkPolyDataMapper2D.h"
34 #include "vtkActor2D.h"
35 #include "vtkLookupTable.h"
36 
37 #include "evVisualizer.h"
38 
39 
40 class evInteractorStyle2D : public vtkInteractorStyleImage
41 {
42 public:
43  static evInteractorStyle2D *New();
44  vtkTypeMacro(evInteractorStyle2D, vtkInteractorStyleImage);
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
47  void SetVisualizer(evVisualizer *visualizer);
48  evVisualizer *GetVisualizer(void) const;
49 
50  virtual void OnLeftButtonDown();
51  virtual void OnLeftButtonUp();
52  virtual void OnMiddleButtonUp();
53  virtual void OnRightButtonUp();
54  virtual void OnChar();
55  virtual void OnMouseMove();
56 
57 protected:
60  virtual void ActivateRubberBand(void);
61  virtual void DeactivateRubberBand(void);
62  virtual void RubberBandZoom();
63  virtual void DrawRubberBand(int start_x,
64  int start_y,
65  int end_x,
66  int end_y);
67 
69 
70  int StartPosition[2];
71  int EndPosition[2];
73  vtkPoints *RubberBandPoints;
74 
75  private:
77  void operator=(const evInteractorStyle2D&) {};
78 };
79 
80 
82 {
83  return new evInteractorStyle2D;
84 }
85 
86 
87 inline void evInteractorStyle2D::PrintSelf(ostream& os, vtkIndent indent)
88 {
89  vtkInteractorStyleImage::PrintSelf(os,indent);
90 }
91 
92 
94 {
95  this->Visualizer = visualizer;
96 }
97 
98 
100 {
101  return(this->Visualizer);
102 }
103 
104 #endif
virtual void DrawRubberBand(int start_x, int start_y, int end_x, int end_y)
evVisualizer * GetVisualizer(void) const
Definition: evInteractorStyle2D.h:99
vtkPoints * RubberBandPoints
Definition: evInteractorStyle2D.h:73
void operator=(const evInteractorStyle2D &)
Definition: evInteractorStyle2D.h:77
evVisualizer * Visualizer
Definition: evInteractorStyle2D.h:68
static evInteractorStyle2D * New()
Definition: evInteractorStyle2D.h:81
virtual void OnChar()
virtual void OnLeftButtonUp()
evInteractorStyle2D(const evInteractorStyle2D &)
Definition: evInteractorStyle2D.h:76
virtual void OnRightButtonUp()
int EndPosition[2]
Definition: evInteractorStyle2D.h:71
void SetVisualizer(evVisualizer *visualizer)
Definition: evInteractorStyle2D.h:93
void PrintSelf(ostream &os, vtkIndent indent)
Definition: evInteractorStyle2D.h:87
int RubberBandActive
Definition: evInteractorStyle2D.h:72
virtual void RubberBandZoom()
virtual void OnMiddleButtonUp()
Definition: evVisualizer.h:45
virtual void DeactivateRubberBand(void)
virtual void ActivateRubberBand(void)
int StartPosition[2]
Definition: evInteractorStyle2D.h:70
vtkTypeMacro(evInteractorStyle2D, vtkInteractorStyleImage)
virtual void OnMouseMove()
Definition: evInteractorStyle2D.h:40
virtual void OnLeftButtonDown()