VTK  9.1.0
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 =========================================================================*/
111 #ifndef vtkImplicitPlaneWidget2_h
112 #define vtkImplicitPlaneWidget2_h
113 
114 #include "vtkAbstractWidget.h"
115 #include "vtkInteractionWidgetsModule.h" // For export macro
116 
118 class vtkInteractionCallback;
119 
120 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
121 {
122  friend class vtkInteractionCallback;
123 
124 public:
129 
131 
135  void PrintSelf(ostream& os, vtkIndent indent) override;
137 
144 
145  // Description:
146  // Disable/Enable the widget if needed.
147  // Unobserved the camera if the widget is disabled.
148  void SetEnabled(int enabling) override;
149 
154  void SetLockNormalToCamera(int lock);
155 
160  {
161  return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);
162  }
163 
168 
169 protected:
172 
173  // Manage the state of the widget
176  {
177  Start = 0,
178  Active
179  };
180 
181  // These methods handle events
193 
198  int UpdateCursorShape(int interactionState);
199 
201 
204  vtkInteractionCallback* InteractionCallback;
207 
208 private:
210  void operator=(const vtkImplicitPlaneWidget2&) = delete;
211 };
212 
213 #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 *)
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 *)
vtkInteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
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:113