VTK
vtkCoordinate.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCoordinate.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
54 #ifndef vtkCoordinate_h
55 #define vtkCoordinate_h
56 
57 #include "vtkRenderingCoreModule.h" // For export macro
58 #include "vtkObject.h"
59 class vtkViewport;
60 
61 #define VTK_DISPLAY 0
62 #define VTK_NORMALIZED_DISPLAY 1
63 #define VTK_VIEWPORT 2
64 #define VTK_NORMALIZED_VIEWPORT 3
65 #define VTK_VIEW 4
66 #define VTK_WORLD 5
67 #define VTK_USERDEFINED 6
68 
70 {
71 public:
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
77  static vtkCoordinate* New();
78 
80 
83  vtkSetMacro(CoordinateSystem, int);
84  vtkGetMacro(CoordinateSystem, int);
86  { this->SetCoordinateSystem(VTK_DISPLAY); }
88  { this->SetCoordinateSystem(VTK_NORMALIZED_DISPLAY); }
90  { this->SetCoordinateSystem(VTK_VIEWPORT); }
92  { this->SetCoordinateSystem(VTK_NORMALIZED_VIEWPORT); }
94  { this->SetCoordinateSystem(VTK_VIEW); }
96  { this->SetCoordinateSystem(VTK_WORLD); }
98 
100 
102 
104  vtkSetVector3Macro(Value, double);
105  vtkGetVector3Macro(Value, double);
106  void SetValue(double a, double b)
107  { this->SetValue(a, b, 0.0); }
109 
111 
115  vtkGetObjectMacro(ReferenceCoordinate, vtkCoordinate);
117 
119 
123  void SetViewport(vtkViewport *viewport);
126 
128 
134 
137 
143 
145 
150  { return this->Value; }
152 
153 protected:
156 
157  double Value[3];
161  double ComputedWorldValue[3];
162  int ComputedDisplayValue[2];
163  int ComputedViewportValue[2];
165 
166  double ComputedDoubleDisplayValue[2];
167  double ComputedDoubleViewportValue[2];
168  double ComputedUserDefinedValue[3];
169 
170 private:
171  vtkCoordinate(const vtkCoordinate&); // Not implemented.
172  void operator=(const vtkCoordinate&); // Not implemented.
173 };
174 
175 #endif
176 
177 
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkCoordinate::New
static vtkCoordinate * New()
vtkCoordinate::~vtkCoordinate
~vtkCoordinate()
vtkgl::b
GLboolean GLboolean GLboolean b
Definition: vtkgl.h:12312
vtkCoordinate::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkCoordinate::SetValue
void SetValue(double a, double b)
Definition: vtkCoordinate.h:106
vtkCoordinate::SetReferenceCoordinate
virtual void SetReferenceCoordinate(vtkCoordinate *)
vtkSetVector3Macro
#define vtkSetVector3Macro(name, type)
Definition: vtkSetGet.h:287
VTK_NORMALIZED_VIEWPORT
#define VTK_NORMALIZED_VIEWPORT
Definition: vtkCoordinate.h:64
vtkCoordinate::SetCoordinateSystemToNormalizedViewport
void SetCoordinateSystemToNormalizedViewport()
Definition: vtkCoordinate.h:91
vtkCoordinate::SetCoordinateSystemToDisplay
void SetCoordinateSystemToDisplay()
Definition: vtkCoordinate.h:85
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkCoordinate::GetCoordinateSystemAsString
const char * GetCoordinateSystemAsString()
vtkCoordinate::ReferenceCoordinate
vtkCoordinate * ReferenceCoordinate
Definition: vtkCoordinate.h:159
vtkCoordinate::GetComputedWorldValue
double * GetComputedWorldValue(vtkViewport *)
VTK_VIEW
#define VTK_VIEW
Definition: vtkCoordinate.h:65
vtkCoordinate::SetCoordinateSystemToWorld
void SetCoordinateSystemToWorld()
Definition: vtkCoordinate.h:95
vtkCoordinate::CoordinateSystem
int CoordinateSystem
Definition: vtkCoordinate.h:158
vtkCoordinate::vtkCoordinate
vtkCoordinate()
vtkCoordinate::GetComputedValue
double * GetComputedValue(vtkViewport *)
vtkGetVector3Macro
#define vtkGetVector3Macro(name, type)
Definition: vtkSetGet.h:304
VTK_VIEWPORT
#define VTK_VIEWPORT
Definition: vtkCoordinate.h:63
vtkCoordinate::GetComputedLocalDisplayValue
int * GetComputedLocalDisplayValue(vtkViewport *)
vtkCoordinate::Computing
int Computing
Definition: vtkCoordinate.h:164
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
VTK_NORMALIZED_DISPLAY
#define VTK_NORMALIZED_DISPLAY
Definition: vtkCoordinate.h:62
vtkCoordinate::SetCoordinateSystemToViewport
void SetCoordinateSystemToViewport()
Definition: vtkCoordinate.h:89
vtkCoordinate
perform coordinate transformation, and represent position, in a variety of vtk coordinate systems
Definition: vtkCoordinate.h:70
vtkCoordinate::GetComputedUserDefinedValue
virtual double * GetComputedUserDefinedValue(vtkViewport *)
Definition: vtkCoordinate.h:149
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkgl::a
GLboolean GLboolean GLboolean GLboolean a
Definition: vtkgl.h:12312
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:47
vtkCoordinate::SetViewport
void SetViewport(vtkViewport *viewport)
vtkObject.h
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkCoordinate::SetCoordinateSystemToNormalizedDisplay
void SetCoordinateSystemToNormalizedDisplay()
Definition: vtkCoordinate.h:87
vtkCoordinate::GetComputedDisplayValue
int * GetComputedDisplayValue(vtkViewport *)
vtkCoordinate::GetComputedViewportValue
int * GetComputedViewportValue(vtkViewport *)
VTK_WORLD
#define VTK_WORLD
Definition: vtkCoordinate.h:66
vtkCoordinate::SetCoordinateSystemToView
void SetCoordinateSystemToView()
Definition: vtkCoordinate.h:93
vtkCoordinate::GetComputedDoubleDisplayValue
double * GetComputedDoubleDisplayValue(vtkViewport *)
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkCoordinate::GetComputedDoubleViewportValue
double * GetComputedDoubleViewportValue(vtkViewport *)
vtkCoordinate::Viewport
vtkViewport * Viewport
Definition: vtkCoordinate.h:160
VTK_DISPLAY
#define VTK_DISPLAY
Definition: vtkCoordinate.h:61