VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkTensorProbeWidget.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 =========================================================================*/ 00033 #ifndef __vtkTensorProbeWidget_h 00034 #define __vtkTensorProbeWidget_h 00035 00036 #include "vtkInteractionWidgetsModule.h" // For export macro 00037 #include "vtkAbstractWidget.h" 00038 00039 class vtkTensorProbeRepresentation; 00040 class vtkPolyData; 00041 00042 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeWidget : public vtkAbstractWidget 00043 { 00044 public: 00046 static vtkTensorProbeWidget *New(); 00047 00049 00050 vtkTypeMacro(vtkTensorProbeWidget, vtkAbstractWidget); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00053 00055 00058 void SetRepresentation(vtkTensorProbeRepresentation *r) 00059 { 00060 this->Superclass::SetWidgetRepresentation( 00061 reinterpret_cast<vtkWidgetRepresentation*>(r)); 00062 } 00064 00066 00067 vtkTensorProbeRepresentation *GetTensorProbeRepresentation() 00068 {return reinterpret_cast<vtkTensorProbeRepresentation*>(this->WidgetRep);} 00070 00072 virtual void CreateDefaultRepresentation(); 00073 00074 protected: 00075 vtkTensorProbeWidget(); 00076 ~vtkTensorProbeWidget(); 00077 00078 // 1 when the probe has been selected, for instance when dragging it around 00079 int Selected; 00080 00081 int LastEventPosition[2]; 00082 00083 // Callback interface to capture events and respond 00084 static void SelectAction (vtkAbstractWidget*); 00085 static void MoveAction (vtkAbstractWidget*); 00086 static void EndSelectAction (vtkAbstractWidget*); 00087 00088 private: 00089 vtkTensorProbeWidget( 00090 const vtkTensorProbeWidget&); //Not implemented 00091 void operator=(const vtkTensorProbeWidget&); //Not implemented 00092 00093 }; 00094 00095 #endif 00096