VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkAffineRepresentation.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 =========================================================================*/ 00038 #ifndef __vtkAffineRepresentation_h 00039 #define __vtkAffineRepresentation_h 00040 00041 #include "vtkInteractionWidgetsModule.h" // For export macro 00042 #include "vtkWidgetRepresentation.h" 00043 00044 class vtkTransform; 00045 00046 class VTKINTERACTIONWIDGETS_EXPORT vtkAffineRepresentation : public vtkWidgetRepresentation 00047 { 00048 public: 00050 00051 vtkTypeMacro(vtkAffineRepresentation,vtkWidgetRepresentation); 00052 void PrintSelf(ostream& os, vtkIndent indent); 00054 00060 virtual void GetTransform(vtkTransform *t) = 0; 00061 00063 00066 vtkSetClampMacro(Tolerance,int,1,100); 00067 vtkGetMacro(Tolerance,int); 00069 00070 //BTX 00071 // Enums define the state of the representation relative to the mouse pointer 00072 // position. Used by ComputeInteractionState() to communicate with the 00073 // widget. 00074 enum _InteractionState 00075 { 00076 Outside=0, Rotate, Translate, TranslateX, TranslateY, ScaleWEdge, ScaleEEdge, 00077 ScaleNEdge, ScaleSEdge, ScaleNE, ScaleSW, ScaleNW, ScaleSE, 00078 ShearEEdge, ShearWEdge, ShearNEdge, ShearSEdge, 00079 MoveOriginX, MoveOriginY, MoveOrigin 00080 }; 00081 //ETX 00082 00085 virtual void ShallowCopy(vtkProp *prop); 00086 00087 protected: 00088 vtkAffineRepresentation(); 00089 ~vtkAffineRepresentation(); 00090 00091 // The tolerance for selecting different parts of the widget. 00092 int Tolerance; 00093 00094 // The internal transformation matrix 00095 vtkTransform *Transform; 00096 00097 private: 00098 vtkAffineRepresentation(const vtkAffineRepresentation&); //Not implemented 00099 void operator=(const vtkAffineRepresentation&); //Not implemented 00100 }; 00101 00102 #endif