Common/vtkCoordinate.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00058 #ifndef __vtkCoordinate_h
00059 #define __vtkCoordinate_h
00060
00061 #include "vtkObject.h"
00062 class vtkViewport;
00063
00064 #define VTK_DISPLAY 0
00065 #define VTK_NORMALIZED_DISPLAY 1
00066 #define VTK_VIEWPORT 2
00067 #define VTK_NORMALIZED_VIEWPORT 3
00068 #define VTK_VIEW 4
00069 #define VTK_WORLD 5
00070 #define VTK_USERDEFINED 6
00071
00072 class VTK_COMMON_EXPORT vtkCoordinate : public vtkObject
00073 {
00074 public:
00075 vtkTypeRevisionMacro(vtkCoordinate,vtkObject);
00076 void PrintSelf(ostream& os, vtkIndent indent);
00077
00080 static vtkCoordinate* New();
00081
00083
00086 vtkSetMacro(CoordinateSystem, int);
00087 vtkGetMacro(CoordinateSystem, int);
00088 void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00089 void SetCoordinateSystemToNormalizedDisplay()
00090 {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00091 void SetCoordinateSystemToViewport()
00092 {this->SetCoordinateSystem(VTK_VIEWPORT);}
00093 void SetCoordinateSystemToNormalizedViewport()
00094 {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00095 void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00096 void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00098
00099 const char *GetCoordinateSystemAsString ();
00100
00102
00104 vtkSetVector3Macro(Value,float);
00105 vtkGetVector3Macro(Value,float);
00106 void SetValue(float a, float b) { this->SetValue(a,b,0.0);}
00108
00110
00113 virtual void SetReferenceCoordinate(vtkCoordinate*);
00114 vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00116
00118
00120 void SetViewport(vtkViewport *viewport);
00121 vtkGetObjectMacro(Viewport,vtkViewport);
00123
00125
00126 float *GetComputedWorldValue(vtkViewport *);
00127 int *GetComputedViewportValue(vtkViewport *);
00128 int *GetComputedDisplayValue(vtkViewport *);
00129 int *GetComputedLocalDisplayValue(vtkViewport *);
00131
00132 float *GetComputedFloatViewportValue(vtkViewport *);
00133 float *GetComputedFloatDisplayValue(vtkViewport *);
00134
00139 float *GetComputedValue(vtkViewport *);
00140
00142
00146 virtual float *GetComputedUserDefinedValue(vtkViewport *)
00147 { return this->Value; }
00149
00150 protected:
00151 vtkCoordinate();
00152 ~vtkCoordinate();
00153
00154 float Value[3];
00155 int CoordinateSystem;
00156 vtkCoordinate *ReferenceCoordinate;
00157 vtkViewport *Viewport;
00158 float ComputedWorldValue[3];
00159 int ComputedDisplayValue[2];
00160 int ComputedViewportValue[2];
00161 int Computing;
00162
00163 float ComputedFloatDisplayValue[2];
00164 float ComputedFloatViewportValue[2];
00165 float ComputedUserDefinedValue[3];
00166
00167 private:
00168 vtkCoordinate(const vtkCoordinate&);
00169 void operator=(const vtkCoordinate&);
00170 };
00171
00172 #endif
00173
00174