VTK  9.5.20250803
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#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
93 vtkAxisActor2D* GetAxis();
94 vtkProperty2D* GetAxisProperty();
96
100 void BuildRepresentation() override;
101
103
106 void ReleaseGraphicsResources(vtkWindow* w) override;
107 int RenderOverlay(vtkViewport* viewport) override;
108 int RenderOpaqueGeometry(vtkViewport* viewport) override;
110
111protected:
114
115 // Add a line to the mix
117 vtkProperty2D* AxisProperty;
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.
represent the vtkDistanceWidget
double GetDistance() override
Satisfy the superclasses API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
static vtkDistanceRepresentation2D * New()
Instantiate class.
represent the vtkDistanceWidget
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)