VTK  9.3.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 
49 VTK_ABI_NAMESPACE_BEGIN
50 class vtkPolyDataMapper;
51 class vtkSphereSource;
52 class vtkExtractEdges;
53 
54 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle
55 {
56 public:
61 
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
70  void OnMouseMove() override;
71  void OnLeftButtonDown() override;
72  void OnLeftButtonUp() override;
73  void OnMiddleButtonDown() override;
74  void OnMiddleButtonUp() override;
75  void OnRightButtonDown() override;
76  void OnRightButtonUp() override;
78 
82  void OnChar() override;
83 
84  // These methods for the different interactions in different modes
85  // are overridden in subclasses to perform the correct motion.
86  void Rotate() override;
87  void Pan() override;
88  void Dolly() override;
89 
91 
94  vtkSetMacro(LatLongLines, vtkTypeBool);
95  vtkGetMacro(LatLongLines, vtkTypeBool);
96  vtkBooleanMacro(LatLongLines, vtkTypeBool);
98 
99 protected:
101  ~vtkInteractorStyleTerrain() override;
102 
103  // Internal helper attributes
105 
110 
111  void SelectRepresentation();
112  void CreateLatLong();
113 
114  double MotionFactor;
115 
116 private:
118  void operator=(const vtkInteractorStyleTerrain&) = delete;
119 };
120 
121 VTK_ABI_NAMESPACE_END
122 #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:40
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)
virtual void OnMouseMove()
Generic event bindings can be overridden in subclasses.
extract cell edges from any type of dataset