VTK  9.7.1
vtkInteractorStyleTerrain.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
43 #ifndef vtkInteractorStyleTerrain_h
44 #define vtkInteractorStyleTerrain_h
45 
46 #include "vtkInteractionStyleModule.h" // For export macro
47 #include "vtkInteractorStyle.h"
48 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
49 
50 VTK_ABI_NAMESPACE_BEGIN
51 class vtkPolyDataMapper;
52 class vtkSphereSource;
53 class vtkExtractEdges;
54 
55 class VTKINTERACTIONSTYLE_EXPORT VTK_MARSHALAUTO vtkInteractorStyleTerrain
56  : public vtkInteractorStyle
57 {
58 public:
63 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
66 
68 
72  void OnMouseMove() override;
73  void OnLeftButtonDown() override;
74  void OnLeftButtonUp() override;
75  void OnMiddleButtonDown() override;
76  void OnMiddleButtonUp() override;
77  void OnRightButtonDown() override;
78  void OnRightButtonUp() override;
80 
84  void OnChar() override;
85 
86  // These methods for the different interactions in different modes
87  // are overridden in subclasses to perform the correct motion.
88  void Rotate() override;
89  void Pan() override;
90  void Dolly() override;
91 
93 
96  vtkSetMacro(LatLongLines, vtkTypeBool);
97  vtkGetMacro(LatLongLines, vtkTypeBool);
98  vtkBooleanMacro(LatLongLines, vtkTypeBool);
100 
101 protected:
103  ~vtkInteractorStyleTerrain() override;
104 
105  // Internal helper attributes
107 
112 
113  void SelectRepresentation();
114  void CreateLatLong();
115 
116  double MotionFactor;
117 
118 private:
120  void operator=(const vtkInteractorStyleTerrain&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
virtual void OnLeftButtonDown()
virtual void Rotate()
These methods for the different interactions in different modes are overridden in subclasses to perfo...
virtual void OnMiddleButtonDown()
virtual void OnRightButtonDown()
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:41
void OnChar() override
OnChar is triggered when an ASCII key is pressed.
virtual void OnLeftButtonUp()
static vtkInteractorStyle * New()
This class must be supplied with a vtkRenderWindowInteractor wrapper or parent.
virtual void OnMiddleButtonUp()
manipulate camera in scene with natural view up (e.g., terrain)
int vtkTypeBool
Definition: vtkABI.h:64
virtual void OnRightButtonUp()
create a polygonal sphere centered at the origin
a simple class to control print indentation
Definition: vtkIndent.h:28
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
map vtkPolyData to graphics primitives
provide event-driven interface to the rendering window (defines trackball mode)
#define VTK_MARSHALAUTO
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.
extract cell edges from any type of dataset