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
92#ifndef vtkImplicitPlaneWidget2_h
93#define vtkImplicitPlaneWidget2_h
94
95#include "vtkAbstractWidget.h"
96#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
97#include "vtkInteractionWidgetsModule.h" // For export macro
98#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
99
100VTK_ABI_NAMESPACE_BEGIN
102class vtkImplicitPlaneWidget2InteractionCallback;
103
104class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
105{
106 friend class vtkImplicitPlaneWidget2InteractionCallback;
107
108public:
113
115
119 void PrintSelf(ostream& os, vtkIndent indent) override;
121
128
129 // Description:
130 // Disable/Enable the widget if needed.
131 // Unobserved the camera if the widget is disabled.
132 void SetEnabled(int enabling) override;
133
138 void SetLockNormalToCamera(int lock);
139
144 {
145 return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
146 }
147
152
153protected:
156
157 // Manage the state of the widget
160 {
161 Start = 0,
162 Active
163 };
164#if !defined(VTK_LEGACY_REMOVE)
165 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
167#endif
168
169 // These methods handle events
181
186 int UpdateCursorShape(int interactionState);
187
189
192 vtkImplicitPlaneWidget2InteractionCallback* InteractionCallback;
195
196private:
198 void operator=(const vtkImplicitPlaneWidget2&) = delete;
199};
200
201VTK_ABI_NAMESPACE_END
202#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.
vtkImplicitPlaneRepresentation * GetImplicitPlaneRepresentation()
Return the representation as a vtkImplicitPlaneRepresentation.
static void SelectAction(vtkAbstractWidget *)
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.
~vtkImplicitPlaneWidget2() override
void InvokeInteractionCallback()
Handle the interaction callback that may come from the representation.
static vtkImplicitPlaneWidget2 * New()
Instantiate the object.
static void ScaleAction(vtkAbstractWidget *)
a simple class to control print indentation
Definition vtkIndent.h:38
#define VTK_DEPRECATED_IN_9_2_0(reason)