00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00051 #ifndef __vtkCoordinate_h
00052 #define __vtkCoordinate_h
00053
00054 #include "vtkObject.h"
00055 class vtkViewport;
00056
00057 #define VTK_DISPLAY 0
00058 #define VTK_NORMALIZED_DISPLAY 1
00059 #define VTK_VIEWPORT 2
00060 #define VTK_NORMALIZED_VIEWPORT 3
00061 #define VTK_VIEW 4
00062 #define VTK_WORLD 5
00063 #define VTK_USERDEFINED 6
00064
00065 class VTK_FILTERING_EXPORT vtkCoordinate : public vtkObject
00066 {
00067 public:
00068 vtkTypeRevisionMacro(vtkCoordinate,vtkObject);
00069 void PrintSelf(ostream& os, vtkIndent indent);
00070
00073 static vtkCoordinate* New();
00074
00076
00079 vtkSetMacro(CoordinateSystem, int);
00080 vtkGetMacro(CoordinateSystem, int);
00081 void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00082 void SetCoordinateSystemToNormalizedDisplay()
00083 {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00084 void SetCoordinateSystemToViewport()
00085 {this->SetCoordinateSystem(VTK_VIEWPORT);}
00086 void SetCoordinateSystemToNormalizedViewport()
00087 {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00088 void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00089 void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00091
00092 const char *GetCoordinateSystemAsString ();
00093
00095
00097 vtkSetVector3Macro(Value,double);
00098 vtkGetVector3Macro(Value,double);
00099 void SetValue(double a, double b) { this->SetValue(a,b,0.0);}
00101
00103
00106 virtual void SetReferenceCoordinate(vtkCoordinate*);
00107 vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00109
00111
00115 void SetViewport(vtkViewport *viewport);
00116 vtkGetObjectMacro(Viewport,vtkViewport);
00118
00120
00121 double *GetComputedWorldValue(vtkViewport *);
00122 int *GetComputedViewportValue(vtkViewport *);
00123 int *GetComputedDisplayValue(vtkViewport *);
00124 int *GetComputedLocalDisplayValue(vtkViewport *);
00126
00127 double *GetComputedDoubleViewportValue(vtkViewport *);
00128 double *GetComputedDoubleDisplayValue(vtkViewport *);
00129
00134 double *GetComputedValue(vtkViewport *);
00135
00137
00141 virtual double *GetComputedUserDefinedValue(vtkViewport *)
00142 { return this->Value; }
00144
00145 protected:
00146 vtkCoordinate();
00147 ~vtkCoordinate();
00148
00149 double Value[3];
00150 int CoordinateSystem;
00151 vtkCoordinate *ReferenceCoordinate;
00152 vtkViewport *Viewport;
00153 double ComputedWorldValue[3];
00154 int ComputedDisplayValue[2];
00155 int ComputedViewportValue[2];
00156 int Computing;
00157
00158 double ComputedDoubleDisplayValue[2];
00159 double ComputedDoubleViewportValue[2];
00160 double ComputedUserDefinedValue[3];
00161
00162 private:
00163 vtkCoordinate(const vtkCoordinate&);
00164 void operator=(const vtkCoordinate&);
00165 };
00166
00167 #endif
00168
00169