VTK  9.3.20240918
vtkDistanceRepresentation2D.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
25#ifndef vtkDistanceRepresentation2D_h
26#define vtkDistanceRepresentation2D_h
27
29#include "vtkInteractionWidgetsModule.h" // For export macro
30
31VTK_ABI_NAMESPACE_BEGIN
32class vtkAxisActor2D;
33class vtkProperty2D;
34
35class VTKINTERACTIONWIDGETS_EXPORT vtkDistanceRepresentation2D : public vtkDistanceRepresentation
36{
37public:
42
44
48 void PrintSelf(ostream& os, vtkIndent indent) override;
50
54 double GetDistance() override { return this->Distance; }
55
57
62 double* GetPoint1WorldPosition() override;
63 double* GetPoint2WorldPosition() override;
64 void GetPoint1WorldPosition(double pos[3]) override;
65 void GetPoint2WorldPosition(double pos[3]) override;
66 void SetPoint1WorldPosition(double pos[3]) override;
67 void SetPoint2WorldPosition(double pos[3]) override;
69
70 void SetPoint1DisplayPosition(double pos[3]) override;
71 void SetPoint2DisplayPosition(double pos[3]) override;
72 void GetPoint1DisplayPosition(double pos[3]) override;
73 void GetPoint2DisplayPosition(double pos[3]) override;
74
76
84
88 void BuildRepresentation() override;
89
91
95 int RenderOverlay(vtkViewport* viewport) override;
96 int RenderOpaqueGeometry(vtkViewport* viewport) override;
98
99protected:
102
103 // Add a line to the mix
106
107 // The distance between the two points
108 double Distance;
109
110private:
112 void operator=(const vtkDistanceRepresentation2D&) = delete;
113};
114
115VTK_ABI_NAMESPACE_END
116#endif
Create an axis with tick marks and labels.
represent the vtkDistanceWidget
double GetDistance() override
Satisfy the superclasses API.
double * GetPoint1WorldPosition() 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 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.
static vtkDistanceRepresentation2D * New()
Instantiate class.
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.
void SetPoint2WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void BuildRepresentation() override
Method to satisfy superclasses' API.
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.
vtkProperty2D * GetAxisProperty()
Retrieve the vtkAxisActor2D used to draw the measurement axis.
~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:108
represent surface properties of a 2D image
abstract specification for Viewports
Definition vtkViewport.h:65
window superclass for vtkRenderWindow
Definition vtkWindow.h:48