Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Common/vtkCoordinate.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkCoordinate.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00070 #ifndef __vtkCoordinate_h
    00071 #define __vtkCoordinate_h
    00072
    00073 #include "vtkObject.h"
    00074 class vtkViewport;
    00075
    00076 #define VTK_DISPLAY             0
    00077 #define VTK_NORMALIZED_DISPLAY  1
    00078 #define VTK_VIEWPORT            2
    00079 #define VTK_NORMALIZED_VIEWPORT 3
    00080 #define VTK_VIEW                4
    00081 #define VTK_WORLD               5
    00082 #define VTK_USERDEFINED         6
    00083
    00084 class VTK_COMMON_EXPORT vtkCoordinate : public vtkObject
    00085 {
    00086 public:
    00087   vtkTypeRevisionMacro(vtkCoordinate,vtkObject);
    00088   void PrintSelf(ostream& os, vtkIndent indent);
    00089
    00092   static vtkCoordinate* New();
    00093
    00095
    00098   vtkSetMacro(CoordinateSystem, int);
    00099   vtkGetMacro(CoordinateSystem, int);
    00100   void SetCoordinateSystemToDisplay() {this->SetCoordinateSystem(VTK_DISPLAY);}
    00101   void SetCoordinateSystemToNormalizedDisplay()
    00102         {this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY);}
    00103   void SetCoordinateSystemToViewport()
    00104         {this->SetCoordinateSystem(VTK_VIEWPORT);}
    00105   void SetCoordinateSystemToNormalizedViewport()
    00106         {this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT);}
    00107   void SetCoordinateSystemToView() {this->SetCoordinateSystem(VTK_VIEW);}
    00108   void SetCoordinateSystemToWorld() {this->SetCoordinateSystem(VTK_WORLD);}
    00110
    00111   const char *GetCoordinateSystemAsString ();
    00112
    00114
    00116   vtkSetVector3Macro(Value,float);
    00117   vtkGetVector3Macro(Value,float);
    00118   void SetValue(float a, float b) { this->SetValue(a,b,0.0);}
    00120
    00122
    00125   virtual void SetReferenceCoordinate(vtkCoordinate*);
    00126   vtkGetObjectMacro(ReferenceCoordinate,vtkCoordinate);
    00128
    00130
    00132   void SetViewport(vtkViewport *viewport);
    00133   vtkGetObjectMacro(Viewport,vtkViewport);
    00135
    00137
    00138   float *GetComputedWorldValue(vtkViewport *);
    00139   int *GetComputedViewportValue(vtkViewport *);
    00140   int *GetComputedDisplayValue(vtkViewport *);
    00141   int *GetComputedLocalDisplayValue(vtkViewport *);
    00143
    00144   float *GetComputedFloatViewportValue(vtkViewport *);
    00145   float *GetComputedFloatDisplayValue(vtkViewport *);
    00146
    00151   float *GetComputedValue(vtkViewport *);
    00152
    00154
    00158   virtual float *GetComputedUserDefinedValue(vtkViewport *)
    00159     { return this->Value; }
    00161
    00162 protected:
    00163   vtkCoordinate();
    00164   ~vtkCoordinate();
    00165
    00166   float Value[3];
    00167   int   CoordinateSystem;
    00168   vtkCoordinate *ReferenceCoordinate;
    00169   vtkViewport *Viewport;
    00170   float ComputedWorldValue[3];
    00171   int   ComputedDisplayValue[2];
    00172   int   ComputedViewportValue[2];
    00173   int   Computing;
    00174
    00175   float ComputedFloatDisplayValue[2];
    00176   float ComputedFloatViewportValue[2];
    00177   float ComputedUserDefinedValue[3];
    00178
    00179 private:
    00180   vtkCoordinate(const vtkCoordinate&);  // Not implemented.
    00181   void operator=(const vtkCoordinate&);  // Not implemented.
    00182 };
    00183
    00184 #endif
    00185
    00186