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 "vtkWidgetRepresentation.h" 00042 00043 class vtkTransform; 00044 00045 class VTK_WIDGETS_EXPORT vtkAffineRepresentation : public vtkWidgetRepresentation 00046 { 00047 public: 00049 00050 vtkTypeMacro(vtkAffineRepresentation,vtkWidgetRepresentation); 00051 void PrintSelf(ostream& os, vtkIndent indent); 00053 00059 virtual void GetTransform(vtkTransform *t) = 0; 00060 00062 00065 vtkSetClampMacro(Tolerance,int,1,100); 00066 vtkGetMacro(Tolerance,int); 00068 00069 //BTX 00070 // Enums define the state of the representation relative to the mouse pointer 00071 // position. Used by ComputeInteractionState() to communicate with the 00072 // widget. 00073 enum _InteractionState 00074 { 00075 Outside=0, Rotate, Translate, TranslateX, TranslateY, ScaleWEdge, ScaleEEdge, 00076 ScaleNEdge, ScaleSEdge, ScaleNE, ScaleSW, ScaleNW, ScaleSE, 00077 ShearEEdge, ShearWEdge, ShearNEdge, ShearSEdge, 00078 MoveOriginX, MoveOriginY, MoveOrigin 00079 }; 00080 //ETX 00081 00084 virtual void ShallowCopy(vtkProp *prop); 00085 00086 protected: 00087 vtkAffineRepresentation(); 00088 ~vtkAffineRepresentation(); 00089 00090 // The tolerance for selecting different parts of the widget. 00091 int Tolerance; 00092 00093 // The internal transformation matrix 00094 vtkTransform *Transform; 00095 00096 private: 00097 vtkAffineRepresentation(const vtkAffineRepresentation&); //Not implemented 00098 void operator=(const vtkAffineRepresentation&); //Not implemented 00099 }; 00100 00101 #endif