Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkCoordinate.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkCoordinate.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00064 #ifndef __vtkCoordinate_h
00065 #define __vtkCoordinate_h
00066 
00067 #include "vtkObject.h"
00068 class vtkViewport;
00069 
00070 #define VTK_DISPLAY             0
00071 #define VTK_NORMALIZED_DISPLAY  1
00072 #define VTK_VIEWPORT            2
00073 #define VTK_NORMALIZED_VIEWPORT 3
00074 #define VTK_VIEW                4
00075 #define VTK_WORLD               5
00076 #define VTK_USERDEFINED         6
00077 
00078 class VTK_FILTERING_EXPORT vtkCoordinate : public vtkObject
00079 {
00080 public:
00081   vtkTypeRevisionMacro(vtkCoordinate,vtkObject);
00082   void PrintSelf(ostream& os, vtkIndent indent);
00083 
00086   static vtkCoordinate* New();
00087 
00089 
00092   vtkSetMacro(CoordinateSystem, int);
00093   vtkGetMacro(CoordinateSystem, int);
00094   void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00095   void SetCoordinateSystemToNormalizedDisplay() 
00096         {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00097   void SetCoordinateSystemToViewport() 
00098         {this->SetCoordinateSystem(VTK_VIEWPORT);}
00099   void SetCoordinateSystemToNormalizedViewport() 
00100         {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00101   void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00102   void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00104     
00105   const char *GetCoordinateSystemAsString ();
00106 
00108 
00110   vtkSetVector3Macro(Value,double);
00111   vtkGetVector3Macro(Value,double);
00112   void SetValue(double a, double b) { this->SetValue(a,b,0.0);}
00114   
00116 
00119   virtual void SetReferenceCoordinate(vtkCoordinate*);
00120   vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00122 
00124 
00126   void SetViewport(vtkViewport *viewport);
00127   vtkGetObjectMacro(Viewport,vtkViewport);
00129 
00131 
00132   double *GetComputedWorldValue(vtkViewport *);
00133   int *GetComputedViewportValue(vtkViewport *);
00134   int *GetComputedDisplayValue(vtkViewport *);
00135   int *GetComputedLocalDisplayValue(vtkViewport *);
00137 
00138   double *GetComputedDoubleViewportValue(vtkViewport *);
00139   double *GetComputedDoubleDisplayValue(vtkViewport *);
00140 
00145   double *GetComputedValue(vtkViewport *);
00146 
00148 
00152   virtual double *GetComputedUserDefinedValue(vtkViewport *)
00153     { return this->Value; }
00155 
00156 protected:
00157   vtkCoordinate();
00158   ~vtkCoordinate();
00159 
00160   double Value[3];
00161   int   CoordinateSystem;
00162   vtkCoordinate *ReferenceCoordinate;
00163   vtkViewport *Viewport;
00164   double ComputedWorldValue[3];
00165   int   ComputedDisplayValue[2];
00166   int   ComputedViewportValue[2];
00167   int   Computing;
00168 
00169   double ComputedDoubleDisplayValue[2];
00170   double ComputedDoubleViewportValue[2];
00171   double ComputedUserDefinedValue[3];
00172 
00173 private:
00174   vtkCoordinate(const vtkCoordinate&);  // Not implemented.
00175   void operator=(const vtkCoordinate&);  // Not implemented.
00176 };
00177 
00178 #endif
00179 
00180