VTK
vtkDistanceRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkDistanceRepresentation2D.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 =========================================================================*/
36 #ifndef __vtkDistanceRepresentation2D_h
37 #define __vtkDistanceRepresentation2D_h
38 
40 
41 class vtkAxisActor2D;
42 class vtkProperty2D;
43 
44 
46 {
47 public:
50 
52 
54  void PrintSelf(ostream& os, vtkIndent indent);
56 
58 
59  virtual double GetDistance()
60  {return this->Distance;}
62 
64 
67  double* GetPoint1WorldPosition();
68  double* GetPoint2WorldPosition();
69  void GetPoint1WorldPosition(double pos[3]);
70  void GetPoint2WorldPosition(double pos[3]);
71  void SetPoint1WorldPosition(double pos[3]);
72  void SetPoint2WorldPosition(double pos[3]);
74 
75  void SetPoint1DisplayPosition(double pos[3]);
76  void SetPoint2DisplayPosition(double pos[3]);
77  void GetPoint1DisplayPosition(double pos[3]);
78  void GetPoint2DisplayPosition(double pos[3]);
79 
81 
84  vtkAxisActor2D *GetAxis();
85  vtkProperty2D *GetAxisProperty();
87 
89  virtual void BuildRepresentation();
90 
92 
93  virtual void ReleaseGraphicsResources(vtkWindow *w);
94  virtual int RenderOverlay(vtkViewport *viewport);
95  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
97 
98 protected:
101 
102  // Add a line to the mix
105 
106  // The distance between the two points
107  double Distance;
108 
109 private:
111  void operator=(const vtkDistanceRepresentation2D&); //Not implemented
112 };
113 
114 #endif