VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSphereWidget2.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 =========================================================================*/ 00092 #ifndef __vtkSphereWidget2_h 00093 #define __vtkSphereWidget2_h 00094 00095 #include "vtkInteractionWidgetsModule.h" // For export macro 00096 #include "vtkAbstractWidget.h" 00097 00098 class vtkSphereRepresentation; 00099 class vtkHandleWidget; 00100 00101 00102 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget 00103 { 00104 public: 00106 static vtkSphereWidget2 *New(); 00107 00109 00110 vtkTypeMacro(vtkSphereWidget2,vtkAbstractWidget); 00111 void PrintSelf(ostream& os, vtkIndent indent); 00113 00115 00118 void SetRepresentation(vtkSphereRepresentation *r) 00119 {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));} 00121 00123 00125 vtkSetMacro(TranslationEnabled,int); 00126 vtkGetMacro(TranslationEnabled,int); 00127 vtkBooleanMacro(TranslationEnabled,int); 00128 vtkSetMacro(ScalingEnabled,int); 00129 vtkGetMacro(ScalingEnabled,int); 00130 vtkBooleanMacro(ScalingEnabled,int); 00132 00135 void CreateDefaultRepresentation(); 00136 00137 protected: 00138 vtkSphereWidget2(); 00139 ~vtkSphereWidget2(); 00140 00141 //BTX - manage the state of the widget 00142 int WidgetState; 00143 enum _WidgetState {Start=0,Active}; 00144 //ETX 00145 00146 // These methods handle events 00147 static void SelectAction(vtkAbstractWidget*); 00148 static void EndSelectAction(vtkAbstractWidget*); 00149 static void TranslateAction(vtkAbstractWidget*); 00150 static void ScaleAction(vtkAbstractWidget*); 00151 static void MoveAction(vtkAbstractWidget*); 00152 00153 // Control whether scaling and translation are supported 00154 int TranslationEnabled; 00155 int ScalingEnabled; 00156 00157 private: 00158 vtkSphereWidget2(const vtkSphereWidget2&); //Not implemented 00159 void operator=(const vtkSphereWidget2&); //Not implemented 00160 }; 00161 00162 #endif