VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Interaction/Widgets/vtkImplicitPlaneWidget2.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImplicitPlaneWidget2.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00097 #ifndef vtkImplicitPlaneWidget2_h
00098 #define vtkImplicitPlaneWidget2_h
00099 
00100 #include "vtkInteractionWidgetsModule.h" // For export macro
00101 #include "vtkAbstractWidget.h"
00102 
00103 class vtkImplicitPlaneRepresentation;
00104 class vtkInteractionCallback;
00105 
00106 class VTKINTERACTIONWIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget
00107 {
00108   friend class vtkInteractionCallback;
00109 
00110 public:
00112   static vtkImplicitPlaneWidget2 *New();
00113 
00115 
00116   vtkTypeMacro(vtkImplicitPlaneWidget2,vtkAbstractWidget);
00117   void PrintSelf(ostream& os, vtkIndent indent);
00119 
00123   void SetRepresentation( vtkImplicitPlaneRepresentation *rep );
00124 
00125   // Descritpion:
00126   // Disable/Enable the widget if needed.
00127   // Unobserved the camera if the widget is disabled.
00128   void SetEnabled(int enabling);
00129 
00132   void SetLockNormalToCamera(int lock);
00133 
00135 
00136   vtkImplicitPlaneRepresentation *GetImplicitPlaneRepresentation()
00137     {return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);}
00139 
00141   void CreateDefaultRepresentation();
00142 
00143 protected:
00144   vtkImplicitPlaneWidget2();
00145   ~vtkImplicitPlaneWidget2();
00146 
00147 //BTX - manage the state of the widget
00148   int WidgetState;
00149   enum _WidgetState {Start=0,Active};
00150 //ETX
00151 
00152   // These methods handle events
00153   static void SelectAction(vtkAbstractWidget*);
00154   static void TranslateAction(vtkAbstractWidget*);
00155   static void ScaleAction(vtkAbstractWidget*);
00156   static void EndSelectAction(vtkAbstractWidget*);
00157   static void MoveAction(vtkAbstractWidget*);
00158   static void MovePlaneAction(vtkAbstractWidget*);
00159 
00162   int UpdateCursorShape( int interactionState );
00163 
00165 
00166   vtkInteractionCallback *InteractionCallback;
00167   void InvokeInteractionCallback();
00169 
00170 private:
00171   vtkImplicitPlaneWidget2(const vtkImplicitPlaneWidget2&);  //Not implemented
00172   void operator=(const vtkImplicitPlaneWidget2&);  //Not implemented
00173 };
00174 
00175 #endif