VTK  9.3.1
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
22 #ifndef vtkAngleRepresentation2D_h
23 #define vtkAngleRepresentation2D_h
24 
25 #include "vtkAngleRepresentation.h"
26 #include "vtkInteractionWidgetsModule.h" // For export macro
27 #include "vtkNew.h" // vtkNew
28 
29 VTK_ABI_NAMESPACE_BEGIN
30 class vtkLeaderActor2D;
31 class vtkProperty2D;
32 
33 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation2D : public vtkAngleRepresentation
34 {
35 public:
39  static vtkAngleRepresentation2D* New();
40 
42 
46  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  double GetAngle() override;
53 
55 
60  void GetPoint1WorldPosition(double pos[3]) override;
61  void GetCenterWorldPosition(double pos[3]) override;
62  void GetPoint2WorldPosition(double pos[3]) override;
63  void SetPoint1DisplayPosition(double pos[3]) override;
64  void SetPoint1WorldPosition(double pos[3]);
65  void SetCenterDisplayPosition(double pos[3]) override;
66  void SetCenterWorldPosition(double pos[3]);
67  void SetPoint2DisplayPosition(double pos[3]) override;
68  void SetPoint2WorldPosition(double pos[3]);
69  void GetPoint1DisplayPosition(double pos[3]) override;
70  void GetCenterDisplayPosition(double pos[3]) override;
71  void GetPoint2DisplayPosition(double pos[3]) override;
73 
75 
80  vtkGetObjectMacro(Ray1, vtkLeaderActor2D);
81  vtkGetObjectMacro(Ray2, vtkLeaderActor2D);
82  vtkGetObjectMacro(Arc, vtkLeaderActor2D);
84 
86 
93  vtkSetMacro(Force3DArcPlacement, bool);
94  vtkGetMacro(Force3DArcPlacement, bool);
96 
101  void BuildRepresentation() override;
102 
104 
107  void ReleaseGraphicsResources(vtkWindow* w) override;
108  int RenderOverlay(vtkViewport* viewport) override;
110 
111 protected:
113  ~vtkAngleRepresentation2D() override;
114 
115  // The pieces that make up the angle representations
119 
120  bool Force3DArcPlacement = false;
121 
122 private:
124  void operator=(const vtkAngleRepresentation2D&) = delete;
125 };
126 
127 VTK_ABI_NAMESPACE_END
128 #endif
virtual void SetPoint1DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
virtual void GetPoint1DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkNew< vtkLeaderActor2D > Ray2
virtual void GetPoint2DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
window superclass for vtkRenderWindow
Definition: vtkWindow.h:27
virtual void GetPoint1WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
vtkNew< vtkLeaderActor2D > Arc
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual void GetCenterWorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
virtual void SetCenterDisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
create a leader with optional label and arrows
virtual void SetPoint2DisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
represent the vtkAngleWidget
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
vtkNew< vtkLeaderActor2D > Ray1
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
virtual void GetCenterDisplayPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
virtual double GetAngle()=0
This representation and all subclasses must keep an angle (in degrees) consistent with the state of t...
represent the vtkAngleWidget
represent surface properties of a 2D image
Definition: vtkProperty2D.h:29
virtual void GetPoint2WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.