Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
00054 #ifndef __vtkCoordinate_h
00055 #define __vtkCoordinate_h
00056 
00057 #include "vtkObject.h"
00058 class vtkViewport;
00059 
00060 #define VTK_DISPLAY             0
00061 #define VTK_NORMALIZED_DISPLAY  1
00062 #define VTK_VIEWPORT            2
00063 #define VTK_NORMALIZED_VIEWPORT 3
00064 #define VTK_VIEW                4
00065 #define VTK_WORLD               5
00066 #define VTK_USERDEFINED         6
00067 
00068 class VTK_FILTERING_EXPORT vtkCoordinate : public vtkObject
00069 {
00070 public:
00071   vtkTypeRevisionMacro(vtkCoordinate,vtkObject);
00072   void PrintSelf(ostream& os, vtkIndent indent);
00073 
00076   static vtkCoordinate* New();
00077 
00079 
00082   vtkSetMacro(CoordinateSystem, int);
00083   vtkGetMacro(CoordinateSystem, int);
00084   void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
00085   void SetCoordinateSystemToNormalizedDisplay() 
00086         {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
00087   void SetCoordinateSystemToViewport() 
00088         {this->SetCoordinateSystem(VTK_VIEWPORT);}
00089   void SetCoordinateSystemToNormalizedViewport() 
00090         {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
00091   void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
00092   void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
00094     
00095   const char *GetCoordinateSystemAsString ();
00096 
00098 
00100   vtkSetVector3Macro(Value,double);
00101   vtkGetVector3Macro(Value,double);
00102   void SetValue(double a, double b) { this->SetValue(a,b,0.0);}
00104   
00106 
00109   virtual void SetReferenceCoordinate(vtkCoordinate*);
00110   vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
00112 
00114 
00116   void SetViewport(vtkViewport *viewport);
00117   vtkGetObjectMacro(Viewport,vtkViewport);
00119 
00121 
00122   double *GetComputedWorldValue(vtkViewport *);
00123   int *GetComputedViewportValue(vtkViewport *);
00124   int *GetComputedDisplayValue(vtkViewport *);
00125   int *GetComputedLocalDisplayValue(vtkViewport *);
00127 
00128   double *GetComputedDoubleViewportValue(vtkViewport *);
00129   double *GetComputedDoubleDisplayValue(vtkViewport *);
00130 
00135   double *GetComputedValue(vtkViewport *);
00136 
00138 
00142   virtual double *GetComputedUserDefinedValue(vtkViewport *)
00143     { return this->Value; }
00145 
00146 protected:
00147   vtkCoordinate();
00148   ~vtkCoordinate();
00149 
00150   double Value[3];
00151   int   CoordinateSystem;
00152   vtkCoordinate *ReferenceCoordinate;
00153   vtkViewport *Viewport;
00154   double ComputedWorldValue[3];
00155   int   ComputedDisplayValue[2];
00156   int   ComputedViewportValue[2];
00157   int   Computing;
00158 
00159   double ComputedDoubleDisplayValue[2];
00160   double ComputedDoubleViewportValue[2];
00161   double ComputedUserDefinedValue[3];
00162 
00163 private:
00164   vtkCoordinate(const vtkCoordinate&);  // Not implemented.
00165   void operator=(const vtkCoordinate&);  // Not implemented.
00166 };
00167 
00168 #endif
00169 
00170 

Generated on Mon Jan 21 23:07:18 2008 for VTK by  doxygen 1.4.3-20050530