VTK
|
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 =========================================================================*/ 00101 #ifndef __vtkImplicitPlaneWidget2_h 00102 #define __vtkImplicitPlaneWidget2_h 00103 00104 #include "vtkAbstractWidget.h" 00105 00106 class vtkImplicitPlaneRepresentation; 00107 class vtkInteractionCallback; 00108 00109 class VTK_WIDGETS_EXPORT vtkImplicitPlaneWidget2 : public vtkAbstractWidget 00110 { 00111 friend class vtkInteractionCallback; 00112 00113 public: 00115 static vtkImplicitPlaneWidget2 *New(); 00116 00118 00119 vtkTypeMacro(vtkImplicitPlaneWidget2,vtkAbstractWidget); 00120 void PrintSelf(ostream& os, vtkIndent indent); 00122 00126 void SetRepresentation( vtkImplicitPlaneRepresentation *rep ); 00127 00128 // Descritpion: 00129 // Disable/Enable the widget if needed. 00130 // Unobserved the camera if the widget is disabled. 00131 void SetEnabled(int enabling); 00132 00135 void SetLockNormalToCamera(int lock); 00136 00138 00139 vtkImplicitPlaneRepresentation *GetImplicitPlaneRepresentation() 00140 {return reinterpret_cast<vtkImplicitPlaneRepresentation*>(this->WidgetRep);} 00142 00144 void CreateDefaultRepresentation(); 00145 00146 protected: 00147 vtkImplicitPlaneWidget2(); 00148 ~vtkImplicitPlaneWidget2(); 00149 00150 //BTX - manage the state of the widget 00151 int WidgetState; 00152 enum _WidgetState {Start=0,Active}; 00153 //ETX 00154 00155 // These methods handle events 00156 static void SelectAction(vtkAbstractWidget*); 00157 static void TranslateAction(vtkAbstractWidget*); 00158 static void ScaleAction(vtkAbstractWidget*); 00159 static void EndSelectAction(vtkAbstractWidget*); 00160 static void MoveAction(vtkAbstractWidget*); 00161 static void MovePlaneAction(vtkAbstractWidget*); 00162 00165 int UpdateCursorShape( int interactionState ); 00166 00168 00169 vtkInteractionCallback *InteractionCallback; 00170 void InvokeInteractionCallback(); 00172 00173 private: 00174 vtkImplicitPlaneWidget2(const vtkImplicitPlaneWidget2&); //Not implemented 00175 void operator=(const vtkImplicitPlaneWidget2&); //Not implemented 00176 }; 00177 00178 #endif