VTK  9.3.20240419
vtkAngleRepresentation2D.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
41 #ifndef vtkAngleRepresentation2D_h
42 #define vtkAngleRepresentation2D_h
43 
44 #include "vtkAngleRepresentation.h"
45 #include "vtkInteractionWidgetsModule.h" // For export macro
46 #include "vtkNew.h" // vtkNew
47 
48 VTK_ABI_NAMESPACE_BEGIN
49 class vtkLeaderActor2D;
50 class vtkProperty2D;
51 
52 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation2D : public vtkAngleRepresentation
53 {
54 public:
59 
61 
65  void PrintSelf(ostream& os, vtkIndent indent) override;
67 
71  double GetAngle() override;
72 
74 
79  void GetPoint1WorldPosition(double pos[3]) override;
80  void GetCenterWorldPosition(double pos[3]) override;
81  void GetPoint2WorldPosition(double pos[3]) override;
82  void SetPoint1DisplayPosition(double pos[3]) override;
83  void SetPoint1WorldPosition(double pos[3]);
84  void SetCenterDisplayPosition(double pos[3]) override;
85  void SetCenterWorldPosition(double pos[3]);
86  void SetPoint2DisplayPosition(double pos[3]) override;
87  void SetPoint2WorldPosition(double pos[3]);
88  void GetPoint1DisplayPosition(double pos[3]) override;
89  void GetCenterDisplayPosition(double pos[3]) override;
90  void GetPoint2DisplayPosition(double pos[3]) override;
92 
94 
99  vtkGetObjectMacro(Ray1, vtkLeaderActor2D);
100  vtkGetObjectMacro(Ray2, vtkLeaderActor2D);
101  vtkGetObjectMacro(Arc, vtkLeaderActor2D);
103 
105 
112  vtkSetMacro(Force3DArcPlacement, bool);
113  vtkGetMacro(Force3DArcPlacement, bool);
115 
120  void BuildRepresentation() override;
121 
123 
127  int RenderOverlay(vtkViewport* viewport) override;
129 
130 protected:
133 
134  // The pieces that make up the angle representations
138 
139  bool Force3DArcPlacement = false;
140 
141 private:
143  void operator=(const vtkAngleRepresentation2D&) = delete;
144 };
145 
146 VTK_ABI_NAMESPACE_END
147 #endif
represent the vtkAngleWidget
void GetPoint1WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void GetCenterWorldPosition(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.
void GetPoint1DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void SetPoint2WorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
void BuildRepresentation() override
Method defined by vtkWidgetRepresentation superclass and needed here.
vtkNew< vtkLeaderActor2D > Arc
int RenderOverlay(vtkViewport *viewport) override
Methods required by vtkProp superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
void SetCenterDisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void GetPoint2WorldPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
~vtkAngleRepresentation2D() override
void SetPoint1WorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
double GetAngle() override
Satisfy the superclasses API.
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
static vtkAngleRepresentation2D * New()
Instantiate class.
void SetCenterWorldPosition(double pos[3])
Methods to Set/Get the coordinates of the two points defining this representation.
void GetCenterDisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
void SetPoint1DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
vtkNew< vtkLeaderActor2D > Ray1
vtkNew< vtkLeaderActor2D > Ray2
void SetPoint2DisplayPosition(double pos[3]) override
Methods to Set/Get the coordinates of the two points defining this representation.
represent the vtkAngleWidget
a simple class to control print indentation
Definition: vtkIndent.h:108
create a leader with optional label and arrows
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:65
window superclass for vtkRenderWindow
Definition: vtkWindow.h:48