VTK  9.3.20240329
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
105 #ifndef vtkImplicitPlaneWidget2_h
106 #define vtkImplicitPlaneWidget2_h
107 
108 #include "vtkAbstractWidget.h"
109 #include "vtkInteractionWidgetsModule.h" // For export macro
110 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
111 
112 VTK_ABI_NAMESPACE_BEGIN
114 class vtkImplicitPlaneWidget2InteractionCallback;
115 
116 class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkImplicitPlaneWidget2
117  : public vtkAbstractWidget
118 {
119  friend class vtkImplicitPlaneWidget2InteractionCallback;
120 
121 public:
126 
128 
132  void PrintSelf(ostream& os, vtkIndent indent) override;
134 
141 
142  // Description:
143  // Disable/Enable the widget if needed.
144  // Unobserved the camera if the widget is disabled.
145  void SetEnabled(int enabling) override;
146 
151  void SetLockNormalToCamera(int lock);
152 
157  {
158  return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
159  }
160 
165 
166 protected:
169 
170  // Manage the state of the widget
173  {
174  Start = 0,
175  Active
176  };
177 
178  // These methods handle events
190 
195  int UpdateCursorShape(int interactionState);
196 
198 
201  vtkImplicitPlaneWidget2InteractionCallback* InteractionCallback;
204 
205 private:
207  void operator=(const vtkImplicitPlaneWidget2&) = delete;
208 };
209 
210 VTK_ABI_NAMESPACE_END
211 #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:108
#define VTK_MARSHALAUTO