VTK  9.3.1
vtkInteractorStyleRubberBand3D.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
25 #ifndef vtkInteractorStyleRubberBand3D_h
26 #define vtkInteractorStyleRubberBand3D_h
27 
28 #include "vtkInteractionStyleModule.h" // For export macro
30 
31 VTK_ABI_NAMESPACE_BEGIN
33 
34 class VTKINTERACTIONSTYLE_EXPORT vtkInteractorStyleRubberBand3D
36 {
37 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
42  void OnLeftButtonDown() override;
43  void OnLeftButtonUp() override;
44  void OnMiddleButtonDown() override;
45  void OnMiddleButtonUp() override;
46  void OnRightButtonDown() override;
47  void OnRightButtonUp() override;
48  void OnMouseMove() override;
49  void OnMouseWheelForward() override;
50  void OnMouseWheelBackward() override;
51 
53 
56  vtkSetMacro(RenderOnMouseMove, bool);
57  vtkGetMacro(RenderOnMouseMove, bool);
58  vtkBooleanMacro(RenderOnMouseMove, bool);
60 
64  enum
65  {
66  SELECT_NORMAL = 0,
67  SELECT_UNION = 1
68  };
69 
71 
74  vtkGetMacro(Interaction, int);
76 
77  enum
78  {
83  SELECTING
84  };
85 
87 
92  vtkGetVector2Macro(StartPosition, int);
93  vtkGetVector2Macro(EndPosition, int);
95 
96 protected:
99 
100  // The interaction mode
102 
103  // Draws the selection rubber band
104  void RedrawRubberBand();
105 
106  // The end position of the selection
107  int StartPosition[2];
108 
109  // The start position of the selection
110  int EndPosition[2];
111 
112  // The pixel array for the rubber band
114 
115  // Whether to trigger a render when the mouse moves
117 
118 private:
120  void operator=(const vtkInteractorStyleRubberBand3D&) = delete;
121 };
122 
123 VTK_ABI_NAMESPACE_END
124 #endif
void OnMiddleButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMouseWheelBackward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
static vtkInteractorStyleTrackballCamera * New()
a simple class to control print indentation
Definition: vtkIndent.h:28
void OnMouseMove() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnMiddleButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
dynamic, self-adjusting array of unsigned char
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void OnMouseWheelForward() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
A rubber band interactor for a 3D view.
void OnRightButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnRightButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
interactive manipulation of the camera
void OnLeftButtonDown() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.
void OnLeftButtonUp() override
Event bindings controlling the effects of pressing mouse buttons or moving the mouse.