VTK: Interaction/Style/vtkInteractorStyleTerrain.h Source File

| 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
52 #ifndef vtkInteractorStyleTerrain_h
53 #define vtkInteractorStyleTerrain_h
54
55 #include "vtkInteractionStyleModule.h" // For export macro
56 #include "vtkInteractorStyle.h"
57
58 VTK_ABI_NAMESPACE_BEGIN
59 class vtkPolyDataMapper;
60 class vtkSphereSource;
61 class vtkExtractEdges;
62
63 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleTerrain : public vtkInteractorStyle
64 {
65 public:
69 static vtkInteractorStyleTerrain* New();
70
71 vtkTypeMacro(vtkInteractorStyleTerrain, vtkInteractorStyle);
72 void PrintSelf(ostream& os, vtkIndent indent) override;
73
75
79 void OnMouseMove() override;
80 void OnLeftButtonDown() override;
81 void OnLeftButtonUp() override;
82 void OnMiddleButtonDown() override;
83 void OnMiddleButtonUp() override;
84 void OnRightButtonDown() override;
85 void OnRightButtonUp() override;
87
91 void OnChar() override;
92
93 // These methods for the different interactions in different modes
94 // are overridden in subclasses to perform the correct motion.
95 void Rotate() override;
96 void Pan() override;
97 void Dolly() override;
98
100
103 vtkSetMacro(LatLongLines, vtkTypeBool);
104 vtkGetMacro(LatLongLines, vtkTypeBool);
105 vtkBooleanMacro(LatLongLines, vtkTypeBool);
107
108 protected:
109 vtkInteractorStyleTerrain();
110 ~vtkInteractorStyleTerrain() override;
111
112 // Internal helper attributes
113 vtkTypeBool LatLongLines;
114
115 vtkSphereSource* LatLongSphere;
116 vtkPolyDataMapper* LatLongMapper;
117 vtkActor* LatLongActor;
118 vtkExtractEdges* LatLongExtractEdges;
119
120 void SelectRepresentation();
121 void CreateLatLong();
122
123 double MotionFactor;
124
125 private:
126 vtkInteractorStyleTerrain(const vtkInteractorStyleTerrain&) = delete;
127 void operator=(const vtkInteractorStyleTerrain&) = delete;
128 };
129
130 VTK_ABI_NAMESPACE_END
131 #endif
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:50
vtkExtractEdges
extract cell edges from any type of dataset
Definition: vtkExtractEdges.h:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInteractorStyleTerrain
manipulate camera in scene with natural view up (e.g., terrain)
Definition: vtkInteractorStyleTerrain.h:64
vtkInteractorStyleTerrain::OnMiddleButtonUp
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::OnLeftButtonUp
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::SelectRepresentation
void SelectRepresentation()
vtkInteractorStyleTerrain::vtkInteractorStyleTerrain
vtkInteractorStyleTerrain()
vtkInteractorStyleTerrain::Dolly
void Dolly() override
vtkInteractorStyleTerrain::CreateLatLong
void CreateLatLong()
vtkInteractorStyleTerrain::MotionFactor
double MotionFactor
Definition: vtkInteractorStyleTerrain.h:123
vtkInteractorStyleTerrain::OnLeftButtonDown
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::OnMouseMove
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::LatLongMapper
vtkPolyDataMapper * LatLongMapper
Definition: vtkInteractorStyleTerrain.h:116
vtkInteractorStyleTerrain::LatLongLines
vtkTypeBool LatLongLines
Definition: vtkInteractorStyleTerrain.h:113
vtkInteractorStyleTerrain::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInteractorStyleTerrain::LatLongSphere
vtkSphereSource * LatLongSphere
Definition: vtkInteractorStyleTerrain.h:115
vtkInteractorStyleTerrain::OnRightButtonDown
void OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::OnMiddleButtonDown
void OnMiddleButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::LatLongActor
vtkActor * LatLongActor
Definition: vtkInteractorStyleTerrain.h:117
vtkInteractorStyleTerrain::Rotate
void Rotate() override
These methods for the different interactions in different modes are overridden in subclasses to perfo...
vtkInteractorStyleTerrain::OnRightButtonUp
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
vtkInteractorStyleTerrain::LatLongExtractEdges
vtkExtractEdges * LatLongExtractEdges
Definition: vtkInteractorStyleTerrain.h:118
vtkInteractorStyleTerrain::~vtkInteractorStyleTerrain
~vtkInteractorStyleTerrain() override
vtkInteractorStyleTerrain::OnChar
void OnChar() override
Override the "fly-to" (f keypress) for images.
vtkInteractorStyleTerrain::Pan
void Pan() override
vtkInteractorStyleTerrain::New
static vtkInteractorStyleTerrain * New()
Instantiate the object.
vtkInteractorStyle
provide event-driven interface to the rendering window (defines trackball mode)
Definition: vtkInteractorStyle.h:148
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:42
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:44
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkInteractorStyle.h