VTK
vtkInteractorStyleTerrain.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkInteractorStyleTerrain.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 =========================================================================*/
52 #ifndef vtkInteractorStyleTerrain_h
53 #define vtkInteractorStyleTerrain_h
54 
55 #include "vtkInteractionStyleModule.h" // For export macro
56 #include "vtkInteractorStyle.h"
57 
58 class vtkPolyDataMapper;
59 class vtkSphereSource;
60 class vtkExtractEdges;
61 
62 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle
63 {
64 public:
69 
71  void PrintSelf(ostream& os, vtkIndent indent) override;
72 
74 
78  void OnMouseMove() override;
79  void OnLeftButtonDown() override;
80  void OnLeftButtonUp() override;
81  void OnMiddleButtonDown() override;
82  void OnMiddleButtonUp() override;
83  void OnRightButtonDown() override;
84  void OnRightButtonUp() override;
86 
90  void OnChar() override;
91 
92  // These methods for the different interactions in different modes
93  // are overridden in subclasses to perform the correct motion.
94  void Rotate() override;
95  void Pan() override;
96  void Dolly() override;
97 
99 
102  vtkSetMacro(LatLongLines,vtkTypeBool);
103  vtkGetMacro(LatLongLines,vtkTypeBool);
104  vtkBooleanMacro(LatLongLines,vtkTypeBool);
106 
107 protected:
109  ~vtkInteractorStyleTerrain() override;
110 
111  // Internal helper attributes
113 
118 
119  void SelectRepresentation();
120  void CreateLatLong();
121 
122  double MotionFactor;
123 
124 private:
126  void operator=(const vtkInteractorStyleTerrain&) = delete;
127 
128 };
129 
130 #endif
131 
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:42
vtkInteractorStyle::Dolly
virtual void Dolly()
Definition: vtkInteractorStyle.h:299
vtkInteractorStyle.h
vtkExtractEdges
extract cell edges from any type of data
Definition: vtkExtractEdges.h:40
vtkInteractorStyle::Pan
virtual void Pan()
Definition: vtkInteractorStyle.h:298
vtkInteractorStyle::OnChar
void OnChar() override
OnChar is triggered when an ASCII key is pressed.
vtkInteractorStyle::OnMiddleButtonUp
virtual void OnMiddleButtonUp()
Definition: vtkInteractorStyle.h:233
vtkInteractorStyleTerrain::LatLongMapper
vtkPolyDataMapper * LatLongMapper
Definition: vtkInteractorStyleTerrain.h:115
vtkInteractorStyle::OnMouseMove
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.
Definition: vtkInteractorStyle.h:229
vtkInteractorStyleTerrain::LatLongSphere
vtkSphereSource * LatLongSphere
Definition: vtkInteractorStyleTerrain.h:114
vtkInteractorStyle::OnMiddleButtonDown
virtual void OnMiddleButtonDown()
Definition: vtkInteractorStyle.h:232
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:46
vtkInteractorStyle::OnRightButtonDown
virtual void OnRightButtonDown()
Definition: vtkInteractorStyle.h:234
vtkInteractorStyle::OnLeftButtonDown
virtual void OnLeftButtonDown()
Definition: vtkInteractorStyle.h:230
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkInteractorStyleTerrain
manipulate camera in scene with natural view up (e.g., terrain)
Definition: vtkInteractorStyleTerrain.h:62
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:141
vtkInteractorStyleTerrain::LatLongLines
vtkTypeBool LatLongLines
Definition: vtkInteractorStyleTerrain.h:112
vtkInteractorStyle::OnLeftButtonUp
virtual void OnLeftButtonUp()
Definition: vtkInteractorStyle.h:231
vtkInteractorStyle::New
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
vtkInteractorStyleTerrain::LatLongActor
vtkActor * LatLongActor
Definition: vtkInteractorStyleTerrain.h:116
vtkInteractorStyle::Rotate
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
Definition: vtkInteractorStyle.h:296
vtkInteractorStyle::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyle::OnRightButtonUp
virtual void OnRightButtonUp()
Definition: vtkInteractorStyle.h:235
vtkInteractorStyleTerrain::LatLongExtractEdges
vtkExtractEdges * LatLongExtractEdges
Definition: vtkInteractorStyleTerrain.h:117
vtkInteractorStyleTerrain::MotionFactor
double MotionFactor
Definition: vtkInteractorStyleTerrain.h:122
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69