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 =========================================================================*/
98 #ifndef vtkImplicitPlaneWidget2_h
99 #define vtkImplicitPlaneWidget2_h
100 
101 #include "vtkAbstractWidget.h"
102 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
103 #include "vtkInteractionWidgetsModule.h" // For export macro
104 
106 class vtkImplicitPlaneWidget2InteractionCallback;
107 
108 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
109 {
110  friend class vtkImplicitPlaneWidget2InteractionCallback;
111 
112 public:
116  static vtkImplicitPlaneWidget2* New();
117 
119 
123  void PrintSelf(ostream& os, vtkIndent indent) override;
125 
131  void SetRepresentation(vtkImplicitPlaneRepresentation* rep);
132 
133  // Description:
134  // Disable/Enable the widget if needed.
135  // Unobserved the camera if the widget is disabled.
136  void SetEnabled(int enabling) override;
137 
142  void SetLockNormalToCamera(int lock);
143 
148  {
149  return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
150  }
151 
155  void CreateDefaultRepresentation() override;
156 
157 protected:
159  ~vtkImplicitPlaneWidget2() override;
160 
161  // Manage the state of the widget
164  {
165  Start = 0,
166  Active
167  };
168 #if !defined(VTK_LEGACY_REMOVE)
169  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
171 #endif
172 
173  // These methods handle events
174  static void SelectAction(vtkAbstractWidget*);
175  static void TranslateAction(vtkAbstractWidget*);
176  static void ScaleAction(vtkAbstractWidget*);
177  static void EndSelectAction(vtkAbstractWidget*);
178  static void MoveAction(vtkAbstractWidget*);
179  static void MovePlaneAction(vtkAbstractWidget*);
180  static void SelectAction3D(vtkAbstractWidget*);
181  static void EndSelectAction3D(vtkAbstractWidget*);
182  static void MoveAction3D(vtkAbstractWidget*);
183  static void TranslationAxisLock(vtkAbstractWidget*);
184  static void TranslationAxisUnLock(vtkAbstractWidget*);
185 
190  int UpdateCursorShape(int interactionState);
191 
193 
196  vtkImplicitPlaneWidget2InteractionCallback* InteractionCallback;
197  void InvokeInteractionCallback();
199 
200 private:
202  void operator=(const vtkImplicitPlaneWidget2&) = delete;
203 };
204 
205 #endif
3D widget for manipulating an infinite plane
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation * WidgetRep
vtkImplicitPlaneRepresentation * GetImplicitPlaneRepresentation()
Return the representation as a vtkImplicitPlaneRepresentation.
a simple class to control print indentation
Definition: vtkIndent.h:39
a class defining the representation for a vtkImplicitPlaneWidget2
vtkImplicitPlaneWidget2InteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...