00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00047 #ifndef __vtkHandleRepresentation_h
00048 #define __vtkHandleRepresentation_h
00049
00050 #include "vtkWidgetRepresentation.h"
00051
00052 class vtkCoordinate;
00053 class vtkRenderer;
00054 class vtkPointPlacer;
00055
00056 class VTK_WIDGETS_EXPORT vtkHandleRepresentation : public vtkWidgetRepresentation
00057 {
00058 public:
00060
00061 vtkTypeRevisionMacro(vtkHandleRepresentation,vtkWidgetRepresentation);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00064
00066
00072 virtual void SetDisplayPosition(double pos[3]);
00073 virtual void GetDisplayPosition(double pos[3]);
00074 virtual double* GetDisplayPosition();
00075 virtual void SetWorldPosition(double pos[3]);
00076 virtual void GetWorldPosition(double pos[3]);
00077 virtual double* GetWorldPosition();
00079
00081
00084 vtkSetClampMacro(Tolerance,int,1,100);
00085 vtkGetMacro(Tolerance,int);
00087
00089
00093 vtkSetMacro(ActiveRepresentation,int);
00094 vtkGetMacro(ActiveRepresentation,int);
00095 vtkBooleanMacro(ActiveRepresentation,int);
00097
00098
00099
00100
00101
00102
00103 enum _InteractionState { Outside=0, Nearby, Selecting, Translating, Scaling };
00104
00105
00107
00114 vtkSetClampMacro(InteractionState,int,Outside,Scaling);
00116
00118
00121 vtkSetMacro(Constrained,int);
00122 vtkGetMacro(Constrained,int);
00123 vtkBooleanMacro(Constrained,int);
00125
00130 virtual int CheckConstraint(vtkRenderer *renderer, double pos[2]);
00131
00133
00135 virtual void ShallowCopy(vtkProp *prop);
00136 virtual void SetRenderer(vtkRenderer *ren);
00138
00141 virtual unsigned long GetMTime();
00142
00144
00151 virtual void SetPointPlacer ( vtkPointPlacer * );
00152 vtkGetObjectMacro( PointPlacer, vtkPointPlacer );
00154
00155 protected:
00156 vtkHandleRepresentation();
00157 ~vtkHandleRepresentation();
00158
00159 int Tolerance;
00160 int ActiveRepresentation;
00161 int Constrained;
00162
00163
00164
00165
00166
00167 vtkCoordinate *DisplayPosition;
00168 vtkCoordinate *WorldPosition;
00169
00170
00171 vtkTimeStamp DisplayPositionTime;
00172 vtkTimeStamp WorldPositionTime;
00173
00174
00175 vtkPointPlacer * PointPlacer;
00176
00177 private:
00178 vtkHandleRepresentation(const vtkHandleRepresentation&);
00179 void operator=(const vtkHandleRepresentation&);
00180 };
00181
00182 #endif