VTK  9.5.20251201
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
24
25#ifndef vtkDistanceRepresentation2D_h
26#define vtkDistanceRepresentation2D_h
27
29#include "vtkInteractionWidgetsModule.h" // For export macro
30#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
31
32VTK_ABI_NAMESPACE_BEGIN
33class vtkAxisActor2D;
34class vtkProperty2D;
35
36class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkDistanceRepresentation2D
38{
39public:
44
46
50 void PrintSelf(ostream& os, vtkIndent indent) override;
52
56 double GetDistance() override { return this->Distance; }
57
59
65 double* GetPoint1WorldPosition() override;
67 double* GetPoint2WorldPosition() override;
69 void GetPoint1WorldPosition(double pos[3]) VTK_FUTURE_CONST override;
71 void GetPoint2WorldPosition(double pos[3]) VTK_FUTURE_CONST override;
73 void SetPoint1WorldPosition(double pos[3]) override;
75 void SetPoint2WorldPosition(double pos[3]) override;
77
79 void SetPoint1DisplayPosition(double pos[3]) override;
81 void SetPoint2DisplayPosition(double pos[3]) override;
83 void GetPoint1DisplayPosition(double pos[3]) VTK_FUTURE_CONST override;
85 void GetPoint2DisplayPosition(double pos[3]) VTK_FUTURE_CONST override;
86
88
96
100 void BuildRepresentation() override;
101
103
107 int RenderOverlay(vtkViewport* viewport) override;
108 int RenderOpaqueGeometry(vtkViewport* viewport) override;
110
111protected:
114
115 // Add a line to the mix
118
119 // The distance between the two points
120 double Distance;
121
122private:
124 void operator=(const vtkDistanceRepresentation2D&) = delete;
125};
126
127VTK_ABI_NAMESPACE_END
128#endif
Create an axis with tick marks and labels.
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 GetPoint2DisplayPosition(double pos[3]) VTK_FUTURE_CONST 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 GetPoint1DisplayPosition(double pos[3]) VTK_FUTURE_CONST override
Methods to Set/Get the coordinates of the two points defining this representation.
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
vtkProperty2D * GetAxisProperty()
Retrieve the vtkAxisActor2D used to draw the measurement axis.
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.
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:167
represent surface properties of a 2D image
abstract specification for Viewports
Definition vtkViewport.h:66
window superclass for vtkRenderWindow
Definition vtkWindow.h:48
#define VTK_MARSHAL_EXCLUDE_REASON_IS_REDUNDANT
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)