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) override;
62 
66  double GetDistance() override
67  {return this->Distance;}
68 
70 
75  double* GetPoint1WorldPosition() override;
76  double* GetPoint2WorldPosition() override;
77  void GetPoint1WorldPosition(double pos[3]) override;
78  void GetPoint2WorldPosition(double pos[3]) override;
79  void SetPoint1WorldPosition(double pos[3]) override;
80  void SetPoint2WorldPosition(double pos[3]) override;
82 
83  void SetPoint1DisplayPosition(double pos[3]) override;
84  void SetPoint2DisplayPosition(double pos[3]) override;
85  void GetPoint1DisplayPosition(double pos[3]) override;
86  void GetPoint2DisplayPosition(double pos[3]) override;
87 
89 
94  vtkAxisActor2D *GetAxis();
95  vtkProperty2D *GetAxisProperty();
97 
101  void BuildRepresentation() override;
102 
104 
107  void ReleaseGraphicsResources(vtkWindow *w) override;
108  int RenderOverlay(vtkViewport *viewport) override;
109  int RenderOpaqueGeometry(vtkViewport *viewport) override;
111 
112 protected:
114  ~vtkDistanceRepresentation2D() override;
115 
116  // Add a line to the mix
119 
120  // The distance between the two points
121  double Distance;
122 
123 private:
125  void operator=(const vtkDistanceRepresentation2D&) = delete;
126 };
127 
128 #endif
virtual void SetPoint1WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.
virtual void SetPoint1DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.
abstract specification for Viewports
Definition: vtkViewport.h:47
represent the vtkDistanceWidget
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
Create an axis with tick marks and labels.
virtual void GetPoint1DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.
virtual void GetPoint2DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
virtual double * GetPoint1WorldPosition()=0
Methods to Set/Get the coordinates of the two points defining this representation.
a simple class to control print indentation
Definition: vtkIndent.h:39
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void SetPoint2DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
double GetDistance() override
Satisfy the superclasses API.
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
virtual double * GetPoint2WorldPosition()=0
Methods to Set/Get the coordinates of the two points defining this representation.
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
represent the vtkDistanceWidget
virtual void SetPoint2WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the two points defining this representation.