VTK  9.3.0
vtkImplicitPlaneWidget2.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
95 #ifndef vtkImplicitPlaneWidget2_h
96 #define vtkImplicitPlaneWidget2_h
97 
98 #include "vtkAbstractWidget.h"
99 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
100 #include "vtkInteractionWidgetsModule.h" // For export macro
101 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
102 
103 VTK_ABI_NAMESPACE_BEGIN
105 class vtkImplicitPlaneWidget2InteractionCallback;
106 
107 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
108 {
109  friend class vtkImplicitPlaneWidget2InteractionCallback;
110 
111 public:
116 
118 
122  void PrintSelf(ostream& os, vtkIndent indent) override;
124 
131 
132  // Description:
133  // Disable/Enable the widget if needed.
134  // Unobserved the camera if the widget is disabled.
135  void SetEnabled(int enabling) override;
136 
141  void SetLockNormalToCamera(int lock);
142 
147  {
148  return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
149  }
150 
155 
156 protected:
159 
160  // Manage the state of the widget
163  {
164  Start = 0,
165  Active
166  };
167 #if !defined(VTK_LEGACY_REMOVE)
168  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
170 #endif
171 
172  // These methods handle events
184 
189  int UpdateCursorShape(int interactionState);
190 
192 
195  vtkImplicitPlaneWidget2InteractionCallback* InteractionCallback;
198 
199 private:
201  void operator=(const vtkImplicitPlaneWidget2&) = delete;
202 };
203 
204 VTK_ABI_NAMESPACE_END
205 #endif
define the API for widget / widget representation
vtkWidgetRepresentation * WidgetRep
a class defining the representation for a vtkImplicitPlaneWidget2
3D widget for manipulating an infinite plane
int UpdateCursorShape(int interactionState)
Update the cursor shape based on the interaction state.
static void TranslationAxisLock(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Methods for activating this widget.
static void MoveAction3D(vtkAbstractWidget *)
vtkImplicitPlaneWidget2InteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
static void TranslationAxisUnLock(vtkAbstractWidget *)
static void TranslateAction(vtkAbstractWidget *)
void SetLockNormalToCamera(int lock)
Observe/Unobserve the camera if the widget is locked/unlocked to update the vtkImplicitePlaneRepresen...
static void MoveAction(vtkAbstractWidget *)
static void EndSelectAction3D(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void SelectAction3D(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard vtkObject methods.
static void SelectAction(vtkAbstractWidget *)
static vtkImplicitPlaneWidget2 * New()
Instantiate the object.
static void MovePlaneAction(vtkAbstractWidget *)
static void EndSelectAction(vtkAbstractWidget *)
void SetRepresentation(vtkImplicitPlaneRepresentation *rep)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkImplicitPlaneRepresentation * GetImplicitPlaneRepresentation()
Return the representation as a vtkImplicitPlaneRepresentation.
~vtkImplicitPlaneWidget2() override
void InvokeInteractionCallback()
Handle the interaction callback that may come from the representation.
static void ScaleAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTK_DEPRECATED_IN_9_2_0(reason)