VTK  9.2.6
vtkImplicitPlaneWidget2.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImplicitPlaneWidget2.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
114#ifndef vtkImplicitPlaneWidget2_h
115#define vtkImplicitPlaneWidget2_h
116
117#include "vtkAbstractWidget.h"
118#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
119#include "vtkInteractionWidgetsModule.h" // For export macro
120
122class vtkImplicitPlaneWidget2InteractionCallback;
123
124class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
125{
126 friend class vtkImplicitPlaneWidget2InteractionCallback;
127
128public:
133
135
139 void PrintSelf(ostream& os, vtkIndent indent) override;
141
148
149 // Description:
150 // Disable/Enable the widget if needed.
151 // Unobserved the camera if the widget is disabled.
152 void SetEnabled(int enabling) override;
153
158 void SetLockNormalToCamera(int lock);
159
164 {
165 return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
166 }
167
172
173protected:
176
177 // Manage the state of the widget
180 {
181 Start = 0,
182 Active
183 };
184#if !defined(VTK_LEGACY_REMOVE)
185 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
187#endif
188
189 // These methods handle events
201
206 int UpdateCursorShape(int interactionState);
207
209
212 vtkImplicitPlaneWidget2InteractionCallback* InteractionCallback;
215
216private:
218 void operator=(const vtkImplicitPlaneWidget2&) = delete;
219};
220
221#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:119
#define VTK_DEPRECATED_IN_9_2_0(reason)