00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00079 #ifndef __vtkCoordinate_h
00080 #define __vtkCoordinate_h
00081
00082 #include "vtkObject.h"
00083 class vtkViewport;
00084
00085 #define VTK_DISPLAY 0
00086 #define VTK_NORMALIZED_DISPLAY 1
00087 #define VTK_VIEWPORT 2
00088 #define VTK_NORMALIZED_VIEWPORT 3
00089 #define VTK_VIEW 4
00090 #define VTK_WORLD 5
00091 #define VTK_USERDEFINED 6
00092
00093 class VTK_EXPORT vtkCoordinate : public vtkObject
00094 {
00095 public:
00096 vtkTypeMacro(vtkCoordinate,vtkObject);
00097 void PrintSelf(ostream& os, vtkIndent indent);
00098
00101 static vtkCoordinate* New();
00102
00106 vtkSetMacro(CoordinateSystem, int);
00107 vtkGetMacro(CoordinateSystem, int);
00108 void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00109 void SetCoordinateSystemToNormalizedDisplay()
00110 {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00111 void SetCoordinateSystemToViewport()
00112 {this->SetCoordinateSystem(VTK_VIEWPORT);}
00113 void SetCoordinateSystemToNormalizedViewport()
00114 {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00115 void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00116 void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00117
00118 const char *GetCoordinateSystemAsString ();
00119
00122 vtkSetVector3Macro(Value,float);
00123 vtkGetVector3Macro(Value,float);
00124 void SetValue(float a, float b) { this->SetValue(a,b,0.0);}
00125
00129 vtkSetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00130 vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00131
00134 void SetViewport(vtkViewport *viewport);
00135 vtkGetObjectMacro(Viewport,vtkViewport);
00136
00138 float *GetComputedWorldValue(vtkViewport *);
00139 int *GetComputedViewportValue(vtkViewport *);
00140 int *GetComputedDisplayValue(vtkViewport *);
00141 int *GetComputedLocalDisplayValue(vtkViewport *);
00142
00143 float *GetComputedFloatViewportValue(vtkViewport *);
00144 float *GetComputedFloatDisplayValue(vtkViewport *);
00145
00150 float *GetComputedValue(vtkViewport *);
00151
00156 virtual float *GetComputedUserDefinedValue(vtkViewport *)
00157 { return this->Value; }
00158
00159 protected:
00160 vtkCoordinate();
00161 ~vtkCoordinate();
00162 vtkCoordinate(const vtkCoordinate&) {};
00163 void operator=(const vtkCoordinate&) {};
00164
00165 float Value[3];
00166 int CoordinateSystem;
00167 vtkCoordinate *ReferenceCoordinate;
00168 vtkViewport *Viewport;
00169 float ComputedWorldValue[3];
00170 int ComputedDisplayValue[2];
00171 int ComputedViewportValue[2];
00172 int Computing;
00173
00174 float ComputedFloatDisplayValue[2];
00175 float ComputedFloatViewportValue[2];
00176 float ComputedUserDefinedValue[3];
00177
00178 };
00179
00180 #endif
00181
00182