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 =========================================================================*/
37 #ifndef vtkDistanceRepresentation2D_h
38 #define vtkDistanceRepresentation2D_h
39 
40 #include "vtkInteractionWidgetsModule.h" // For export macro
42 
43 class vtkAxisActor2D;
44 class vtkProperty2D;
45 
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkDistanceRepresentation2D : public vtkDistanceRepresentation
48 {
49 public:
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent);
62 
66  virtual double GetDistance()
67  {return this->Distance;}
68 
70 
77  void GetPoint1WorldPosition(double pos[3]);
78  void GetPoint2WorldPosition(double pos[3]);
79  void SetPoint1WorldPosition(double pos[3]);
80  void SetPoint2WorldPosition(double pos[3]);
82 
83  void SetPoint1DisplayPosition(double pos[3]);
84  void SetPoint2DisplayPosition(double pos[3]);
85  void GetPoint1DisplayPosition(double pos[3]);
86  void GetPoint2DisplayPosition(double pos[3]);
87 
89 
97 
101  virtual void BuildRepresentation();
102 
104 
108  virtual int RenderOverlay(vtkViewport *viewport);
109  virtual int RenderOpaqueGeometry(vtkViewport *viewport);
111 
112 protected:
115 
116  // Add a line to the mix
119 
120  // The distance between the two points
121  double Distance;
122 
123 private:
124  vtkDistanceRepresentation2D(const vtkDistanceRepresentation2D&) VTK_DELETE_FUNCTION;
125  void operator=(const vtkDistanceRepresentation2D&) VTK_DELETE_FUNCTION;
126 };
127 
128 #endif
Create an axis with tick marks and labels.
represent the vtkDistanceWidget
virtual int RenderOpaqueGeometry(vtkViewport *viewport)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
virtual void ReleaseGraphicsResources(vtkWindow *w)
Methods required by vtkProp superclass.
void SetPoint2DisplayPosition(double pos[3])
virtual double GetDistance()
Satisfy the superclasses API.
double * GetPoint1WorldPosition()
Methods to Set/Get the coordinates of the two points defining this representation.
void GetPoint1WorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
vtkProperty2D * GetAxisProperty()
vtkAxisActor2D * GetAxis()
Retrieve the vtkAxisActor2D used to draw the measurement axis.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void SetPoint1DisplayPosition(double pos[3])
static vtkDistanceRepresentation2D * New()
Instantiate class.
virtual int RenderOverlay(vtkViewport *viewport)
virtual void BuildRepresentation()
Method to satisfy superclasses' API.
void SetPoint2WorldPosition(double pos[3])
void SetPoint1WorldPosition(double pos[3])
void GetPoint2WorldPosition(double pos[3])
void GetPoint1DisplayPosition(double pos[3])
void GetPoint2DisplayPosition(double pos[3])
represent the vtkDistanceWidget
a simple class to control print indentation
Definition: vtkIndent.h:40
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
abstract specification for Viewports
Definition: vtkViewport.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35