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 vtkTypeMacro(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 DeepCopy(vtkProp *prop);
00137 virtual void SetRenderer(vtkRenderer *ren);
00139
00142 virtual unsigned long GetMTime();
00143
00145
00152 virtual void SetPointPlacer ( vtkPointPlacer * );
00153 vtkGetObjectMacro( PointPlacer, vtkPointPlacer );
00155
00156 protected:
00157 vtkHandleRepresentation();
00158 ~vtkHandleRepresentation();
00159
00160 int Tolerance;
00161 int ActiveRepresentation;
00162 int Constrained;
00163
00164
00165
00166
00167
00168 vtkCoordinate *DisplayPosition;
00169 vtkCoordinate *WorldPosition;
00170
00171
00172 vtkTimeStamp DisplayPositionTime;
00173 vtkTimeStamp WorldPositionTime;
00174
00175
00176 vtkPointPlacer * PointPlacer;
00177
00178 private:
00179 vtkHandleRepresentation(const vtkHandleRepresentation&);
00180 void operator=(const vtkHandleRepresentation&);
00181 };
00182
00183 #endif