VTK
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 =========================================================================*/
92 #ifndef vtkImplicitPlaneWidget2_h
93 #define vtkImplicitPlaneWidget2_h
94 
95 #include "vtkInteractionWidgetsModule.h" // For export macro
96 #include "vtkAbstractWidget.h"
97 
99 class vtkInteractionCallback;
100 
101 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
102 {
103  friend class vtkInteractionCallback;
104 
105 public:
109  static vtkImplicitPlaneWidget2 *New();
110 
112 
116  void PrintSelf(ostream& os, vtkIndent indent) override;
118 
124  void SetRepresentation( vtkImplicitPlaneRepresentation *rep );
125 
126  // Description:
127  // Disable/Enable the widget if needed.
128  // Unobserved the camera if the widget is disabled.
129  void SetEnabled(int enabling) override;
130 
135  void SetLockNormalToCamera(int lock);
136 
141  {return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);}
142 
146  void CreateDefaultRepresentation() override;
147 
148 protected:
150  ~vtkImplicitPlaneWidget2() override;
151 
152  // Manage the state of the widget
154  enum _WidgetState {Start=0,Active};
155 
156  // These methods handle events
157  static void SelectAction(vtkAbstractWidget*);
158  static void TranslateAction(vtkAbstractWidget*);
159  static void ScaleAction(vtkAbstractWidget*);
160  static void EndSelectAction(vtkAbstractWidget*);
161  static void MoveAction(vtkAbstractWidget*);
162  static void MovePlaneAction(vtkAbstractWidget*);
163  static void SelectAction3D(vtkAbstractWidget*);
164  static void EndSelectAction3D(vtkAbstractWidget*);
165  static void MoveAction3D(vtkAbstractWidget*);
166 
171  int UpdateCursorShape( int interactionState );
172 
174 
177  vtkInteractionCallback *InteractionCallback;
178  void InvokeInteractionCallback();
180 
181 private:
183  void operator=(const vtkImplicitPlaneWidget2&) = delete;
184 };
185 
186 #endif
vtkImplicitPlaneWidget2::WidgetState
int WidgetState
Definition: vtkImplicitPlaneWidget2.h:153
vtkImplicitPlaneWidget2::_WidgetState
_WidgetState
Definition: vtkImplicitPlaneWidget2.h:154
vtkAbstractWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAbstractWidget.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkImplicitPlaneRepresentation
a class defining the representation for a vtkImplicitPlaneWidget2
Definition: vtkImplicitPlaneRepresentation.h:64
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkImplicitPlaneWidget2
3D widget for manipulating an infinite plane
Definition: vtkImplicitPlaneWidget2.h:101
vtkAbstractWidget::CreateDefaultRepresentation
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkImplicitPlaneWidget2::GetImplicitPlaneRepresentation
vtkImplicitPlaneRepresentation * GetImplicitPlaneRepresentation()
Return the representation as a vtkImplicitPlaneRepresentation.
Definition: vtkImplicitPlaneWidget2.h:140
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImplicitPlaneWidget2::InteractionCallback
vtkInteractionCallback * InteractionCallback
Handle the interaction callback that may come from the representation.
Definition: vtkImplicitPlaneWidget2.h:177
vtkAbstractWidget::SetEnabled
void SetEnabled(int) override
Methods for activating this widget.