Slicer  4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkThreeDViewInteractorStyle.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: $RCSfile: vtkInteractorStyleTrackballCamera.h,v $
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 =========================================================================*/
15 
16 #ifndef __vtkThreeDViewInteractorStyle_h
17 #define __vtkThreeDViewInteractorStyle_h
18 
19 // MRML includes
20 #include "vtkMRML.h"
21 #include "vtkMRMLCameraNode.h"
22 
23 // VTK includes
24 #include "vtkObject.h"
25 #include "vtkInteractorStyle.h"
26 #include "vtkSmartPointer.h"
27 
28 #include "vtkMRMLDisplayableManagerExport.h"
29 
31 class vtkCellPicker;
32 
51 class VTK_MRML_DISPLAYABLEMANAGER_EXPORT vtkThreeDViewInteractorStyle :
52  public vtkInteractorStyle
53 {
54 public:
55  static vtkThreeDViewInteractorStyle *New();
56  vtkTypeMacro(vtkThreeDViewInteractorStyle,vtkInteractorStyle);
57  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
58 
60 
61  virtual void OnChar() VTK_OVERRIDE;
62  virtual void OnKeyPress() VTK_OVERRIDE;
63  virtual void OnKeyRelease() VTK_OVERRIDE;
64 
68  virtual void OnMouseMove() VTK_OVERRIDE;
69  virtual void OnLeave() VTK_OVERRIDE;
70  virtual void OnLeftButtonDown() VTK_OVERRIDE;
71  virtual void OnLeftButtonUp() VTK_OVERRIDE;
72  virtual void OnMiddleButtonDown() VTK_OVERRIDE;
73  virtual void OnMiddleButtonUp() VTK_OVERRIDE;
74  virtual void OnRightButtonDown() VTK_OVERRIDE;
75  virtual void OnRightButtonUp() VTK_OVERRIDE;
76  virtual void OnMouseWheelForward() VTK_OVERRIDE;
77  virtual void OnMouseWheelBackward() VTK_OVERRIDE;
78 
83  virtual void Rotate() VTK_OVERRIDE;
84  virtual void Spin() VTK_OVERRIDE;
85  virtual void Pan() VTK_OVERRIDE;
86  virtual void Dolly() VTK_OVERRIDE;
87  virtual void Dolly(double factor);
88 
89  virtual void OnExpose() VTK_OVERRIDE;
90 
93  vtkGetObjectMacro ( CameraNode, vtkMRMLCameraNode );
94  vtkSetObjectMacro ( CameraNode, vtkMRMLCameraNode );
95 
98  virtual void SetInteractor(vtkRenderWindowInteractor *interactor) VTK_OVERRIDE;
99 
102  vtkGetObjectMacro(ModelDisplayableManager, vtkMRMLModelDisplayableManager);
103  virtual void SetModelDisplayableManager(vtkMRMLModelDisplayableManager *modelDisplayableManager);
104 
105 protected:
108 
109  bool Pick(int x, int y, double pickPoint[3]);
110 
111  vtkMRMLCameraNode *CameraNode;
112 
113  double MotionFactor;
114 
117  bool ShiftKeyUsedForPreviousAction;
118 
121  int NumberOfPlaces;
122 
123 
126  int NumberOfTransientPlaces;
127 
130  vtkMRMLModelDisplayableManager * ModelDisplayableManager;
131 
133  vtkSmartPointer<vtkCellPicker> CellPicker;
134 
135 private:
137  void operator=(const vtkThreeDViewInteractorStyle&);
138 };
139 
140 #endif
Manage display nodes with polydata in 3D views.
Interactive manipulation of the camera.
MRML node to represent camera node.