limited volume meshing to boundary layer only
[engrid-github.git] / src / libengrid / egvtkinteractorstyle.h
bloba90222b45e94b9edbf9f43d230e4ab43e23d6e89
1 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 // + +
3 // + This file is part of enGrid. +
4 // + +
5 // + Copyright 2008-2014 enGits GmbH +
6 // + +
7 // + enGrid is free software: you can redistribute it and/or modify +
8 // + it under the terms of the GNU General Public License as published by +
9 // + the Free Software Foundation, either version 3 of the License, or +
10 // + (at your option) any later version. +
11 // + +
12 // + enGrid is distributed in the hope that it will be useful, +
13 // + but WITHOUT ANY WARRANTY; without even the implied warranty of +
14 // + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +
15 // + GNU General Public License for more details. +
16 // + +
17 // + You should have received a copy of the GNU General Public License +
18 // + along with enGrid. If not, see <http://www.gnu.org/licenses/>. +
19 // + +
20 // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21 #ifndef EGVTKINTERACTORSTYLE_H
22 #define EGVTKINTERACTORSTYLE_H
24 #include <vtkInteractorStyle.h>
26 #include "vtkCamera.h"
27 #include "vtkRenderWindowInteractor.h"
28 #include "vtkCallbackCommand.h"
29 #include "vtkRenderer.h"
30 #include "vtkRenderWindow.h"
32 #include <iostream>
33 using namespace std;
35 class egvtkInteractorStyle : public vtkInteractorStyle
37 public:
39 // Event information
40 int AltKey;
41 int ControlKey;
42 int ShiftKey;
43 char KeyCode;
44 int RepeatCount;
45 char* KeySym;
46 int EventPosition[2];
47 int LastEventPosition[2];
48 int EventSize[2];
49 int Size[2];
50 int TimerEventId;
51 int TimerEventType;
52 int TimerEventDuration;
53 int TimerEventPlatformId;
55 static egvtkInteractorStyle *New();
56 void PrintSelf(ostream& os, vtkIndent indent);
58 // Description:
59 // Event bindings controlling the effects of pressing mouse buttons
60 // or moving the mouse.
61 void OnMouseMove();
62 void OnLeftButtonDown();
63 void OnLeftButtonUp();
64 void OnMiddleButtonDown();
65 void OnMiddleButtonUp();
66 void OnRightButtonDown();
67 void OnRightButtonUp();
68 void OnMouseWheelForward();
69 void OnMouseWheelBackward();
70 void OnChar();
72 /* void OnKeyDown (){
73 cout<<"OnKeyDown "<<this->Interactor->GetKeyCode()<<endl;
74 this->EventCallbackCommand->SetAbortFlag(1);
76 void OnKeyUp (){
77 cout<<"OnKeyUp "<<this->Interactor->GetKeyCode()<<endl;
78 this->EventCallbackCommand->SetAbortFlag(1);
80 void OnKeyPress (){
81 cout<<"OnKeyPress "<<this->Interactor->GetKeyCode()<<endl;
82 this->EventCallbackCommand->SetAbortFlag(1);
84 void OnKeyRelease (){
85 cout<<"OnKeyRelease "<<this->Interactor->GetKeyCode()<<endl;
86 this->EventCallbackCommand->SetAbortFlag(1);
87 };*/
89 // These methods for the different interactions in different modes
90 // are overridden in subclasses to perform the correct motion. Since
91 // they are called by OnTimer, they do not have mouse coord parameters
92 // (use interactor's GetEventPosition and GetLastEventPosition)
93 void Rotate();
94 void Spin();
95 void Pan();
96 void Dolly();
98 // Description:
99 // Set the apparent sensitivity of the interactor style to mouse motion.
101 protected:
102 egvtkInteractorStyle();
103 ~egvtkInteractorStyle();
105 double MotionFactor;
107 void Dolly(double factor);
109 private:
110 egvtkInteractorStyle(const egvtkInteractorStyle&); // Not implemented.
111 void operator=(const egvtkInteractorStyle&); // Not implemented.
114 #endif