VTK  9.2.20230601
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 
41 #include "vtkInteractionWidgetsModule.h" // For export macro
42 
43 VTK_ABI_NAMESPACE_BEGIN
44 class vtkAxisActor2D;
45 class vtkProperty2D;
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 { return this->Distance; }
67 
69 
74  double* GetPoint1WorldPosition() override;
75  double* GetPoint2WorldPosition() override;
76  void GetPoint1WorldPosition(double pos[3]) override;
77  void GetPoint2WorldPosition(double pos[3]) override;
78  void SetPoint1WorldPosition(double pos[3]) override;
79  void SetPoint2WorldPosition(double pos[3]) override;
81 
82  void SetPoint1DisplayPosition(double pos[3]) override;
83  void SetPoint2DisplayPosition(double pos[3]) override;
84  void GetPoint1DisplayPosition(double pos[3]) override;
85  void GetPoint2DisplayPosition(double pos[3]) override;
86 
88 
96 
100  void BuildRepresentation() override;
101 
103 
107  int RenderOverlay(vtkViewport* viewport) override;
108  int RenderOpaqueGeometry(vtkViewport* viewport) override;
110 
111 protected:
114 
115  // Add a line to the mix
118 
119  // The distance between the two points
120  double Distance;
121 
122 private:
124  void operator=(const vtkDistanceRepresentation2D&) = delete;
125 };
126 
127 VTK_ABI_NAMESPACE_END
128 #endif
Create an axis with tick marks and labels.
represent the vtkDistanceWidget
double GetDistance() override
Satisfy the superclasses API.
void GetPoint1DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
void SetPoint1WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
double * GetPoint1WorldPosition() override
Methods to Set/Get the coordinates of the two points defining this representation.
double * GetPoint2WorldPosition() override
Methods to Set/Get the coordinates of the two points defining this representation.
int RenderOpaqueGeometry(vtkViewport *viewport) override
Methods required by vtkProp superclass.
vtkProperty2D * GetAxisProperty()
Retrieve the vtkAxisActor2D used to draw the measurement axis.
void SetPoint2WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
vtkAxisActor2D * GetAxis()
Retrieve the vtkAxisActor2D used to draw the measurement axis.
void BuildRepresentation() override
Method to satisfy superclasses' API.
static vtkDistanceRepresentation2D * New()
Instantiate class.
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
void GetPoint2WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void GetPoint2DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
~vtkDistanceRepresentation2D() override
void GetPoint1WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void SetPoint2DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
int RenderOverlay(vtkViewport *viewport) override
Methods required by vtkProp superclass.
void SetPoint1DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
represent the vtkDistanceWidget
a simple class to control print indentation
Definition: vtkIndent.h:120
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40