VTK  9.3.0
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
31 #ifndef vtkAngleRepresentation2D_h
32 #define vtkAngleRepresentation2D_h
33 
34 #include "vtkAngleRepresentation.h"
35 #include "vtkInteractionWidgetsModule.h" // For export macro
36 #include "vtkNew.h" // vtkNew
37 
38 VTK_ABI_NAMESPACE_BEGIN
39 class vtkLeaderActor2D;
40 class vtkProperty2D;
41 
42 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation2D : public vtkAngleRepresentation
43 {
44 public:
49 
51 
55  void PrintSelf(ostream& os, vtkIndent indent) override;
57 
61  double GetAngle() override;
62 
64 
69  void GetPoint1WorldPosition(double pos[3]) override;
70  void GetCenterWorldPosition(double pos[3]) override;
71  void GetPoint2WorldPosition(double pos[3]) override;
72  void SetPoint1DisplayPosition(double pos[3]) override;
73  void SetPoint1WorldPosition(double pos[3]);
74  void SetCenterDisplayPosition(double pos[3]) override;
75  void SetCenterWorldPosition(double pos[3]);
76  void SetPoint2DisplayPosition(double pos[3]) override;
77  void SetPoint2WorldPosition(double pos[3]);
78  void GetPoint1DisplayPosition(double pos[3]) override;
79  void GetCenterDisplayPosition(double pos[3]) override;
80  void GetPoint2DisplayPosition(double pos[3]) override;
82 
84 
89  vtkGetObjectMacro(Ray1, vtkLeaderActor2D);
90  vtkGetObjectMacro(Ray2, vtkLeaderActor2D);
91  vtkGetObjectMacro(Arc, vtkLeaderActor2D);
93 
95 
102  vtkSetMacro(Force3DArcPlacement, bool);
103  vtkGetMacro(Force3DArcPlacement, bool);
105 
110  void BuildRepresentation() override;
111 
113 
117  int RenderOverlay(vtkViewport* viewport) override;
119 
120 protected:
123 
124  // The pieces that make up the angle representations
128 
129  bool Force3DArcPlacement = false;
130 
131 private:
133  void operator=(const vtkAngleRepresentation2D&) = delete;
134 };
135 
136 VTK_ABI_NAMESPACE_END
137 #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:38
create a leader with optional label and arrows
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
abstract specification for Viewports
Definition: vtkViewport.h:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37