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 =========================================================================*/
97 #ifndef vtkImplicitPlaneWidget2_h
98 #define vtkImplicitPlaneWidget2_h
99 
100 #include "vtkInteractionWidgetsModule.h" // For export macro
101 #include "vtkAbstractWidget.h"
102 
104 class vtkInteractionCallback;
105 
107 {
108  friend class vtkInteractionCallback;
109 
110 public:
112  static vtkImplicitPlaneWidget2 *New();
113 
115 
117  void PrintSelf(ostream& os, vtkIndent indent);
119 
123  void SetRepresentation( vtkImplicitPlaneRepresentation *rep );
124 
125  // Descritpion:
126  // Disable/Enable the widget if needed.
127  // Unobserved the camera if the widget is disabled.
128  void SetEnabled(int enabling);
129 
132  void SetLockNormalToCamera(int lock);
133 
135 
137  {return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);}
139 
142 
143 protected:
146 
147 //BTX - manage the state of the widget
149  enum _WidgetState {Start=0,Active};
150 //ETX
151 
152  // These methods handle events
153  static void SelectAction(vtkAbstractWidget*);
154  static void TranslateAction(vtkAbstractWidget*);
155  static void ScaleAction(vtkAbstractWidget*);
156  static void EndSelectAction(vtkAbstractWidget*);
157  static void MoveAction(vtkAbstractWidget*);
158  static void MovePlaneAction(vtkAbstractWidget*);
159 
162  int UpdateCursorShape( int interactionState );
163 
165 
166  vtkInteractionCallback *InteractionCallback;
167  void InvokeInteractionCallback();
169 
170 private:
171  vtkImplicitPlaneWidget2(const vtkImplicitPlaneWidget2&); //Not implemented
172  void operator=(const vtkImplicitPlaneWidget2&); //Not implemented
173 };
174 
175 #endif
void PrintSelf(ostream &os, vtkIndent indent)
3D widget for manipulating an infinite plane
virtual void CreateDefaultRepresentation()=0
vtkWidgetRepresentation * WidgetRep
#define VTKINTERACTIONWIDGETS_EXPORT
vtkImplicitPlaneRepresentation * GetImplicitPlaneRepresentation()
a simple class to control print indentation
Definition: vtkIndent.h:38
a class defining the representation for a vtkImplicitPlaneWidget2
vtkInteractionCallback * InteractionCallback
define the API for widget / widget representation
static vtkObject * New()
virtual void SetEnabled(int)