VTK  9.2.20230606
vtkAngleRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAngleRepresentation2D.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
53 #ifndef vtkAngleRepresentation2D_h
54 #define vtkAngleRepresentation2D_h
55 
56 #include "vtkAngleRepresentation.h"
57 #include "vtkInteractionWidgetsModule.h" // For export macro
58 #include "vtkNew.h" // vtkNew
59 
60 VTK_ABI_NAMESPACE_BEGIN
61 class vtkLeaderActor2D;
62 class vtkProperty2D;
63 
64 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation2D : public vtkAngleRepresentation
65 {
66 public:
71 
73 
77  void PrintSelf(ostream& os, vtkIndent indent) override;
79 
83  double GetAngle() override;
84 
86 
91  void GetPoint1WorldPosition(double pos[3]) override;
92  void GetCenterWorldPosition(double pos[3]) override;
93  void GetPoint2WorldPosition(double pos[3]) override;
94  void SetPoint1DisplayPosition(double pos[3]) override;
95  void SetPoint1WorldPosition(double pos[3]);
96  void SetCenterDisplayPosition(double pos[3]) override;
97  void SetCenterWorldPosition(double pos[3]);
98  void SetPoint2DisplayPosition(double pos[3]) override;
99  void SetPoint2WorldPosition(double pos[3]);
100  void GetPoint1DisplayPosition(double pos[3]) override;
101  void GetCenterDisplayPosition(double pos[3]) override;
102  void GetPoint2DisplayPosition(double pos[3]) override;
104 
106 
111  vtkGetObjectMacro(Ray1, vtkLeaderActor2D);
112  vtkGetObjectMacro(Ray2, vtkLeaderActor2D);
113  vtkGetObjectMacro(Arc, vtkLeaderActor2D);
115 
117 
124  vtkSetMacro(Force3DArcPlacement, bool);
125  vtkGetMacro(Force3DArcPlacement, bool);
127 
132  void BuildRepresentation() override;
133 
135 
139  int RenderOverlay(vtkViewport* viewport) override;
141 
142 protected:
145 
146  // The pieces that make up the angle representations
150 
151  bool Force3DArcPlacement = false;
152 
153 private:
155  void operator=(const vtkAngleRepresentation2D&) = delete;
156 };
157 
158 VTK_ABI_NAMESPACE_END
159 #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:120
create a leader with optional label and arrows
represent surface properties of a 2D image
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40