VTK
vtkAngleRepresentation3D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkAngleRepresentation3D.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 =========================================================================*/
31 #ifndef vtkAngleRepresentation3D_h
32 #define vtkAngleRepresentation3D_h
33 
34 #include "vtkInteractionWidgetsModule.h" // For export macro
35 #include "vtkAngleRepresentation.h"
36 
37 class vtkActor;
38 class vtkProperty;
39 class vtkPolyDataMapper;
40 class vtkLineSource;
41 class vtkArcSource;
42 class vtkFollower;
43 class vtkVectorText;
44 class vtkPolyDataMapper;
45 class vtkTextProperty;
46 
47 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation3D : public vtkAngleRepresentation
48 {
49 public:
53  static vtkAngleRepresentation3D *New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62 
66  double GetAngle() VTK_OVERRIDE;
67 
69 
74  void GetPoint1WorldPosition(double pos[3]) VTK_OVERRIDE;
75  void GetCenterWorldPosition(double pos[3]) VTK_OVERRIDE;
76  void GetPoint2WorldPosition(double pos[3]) VTK_OVERRIDE;
77  virtual void SetPoint1WorldPosition(double pos[3]);
78  void SetPoint1DisplayPosition(double pos[3]) VTK_OVERRIDE;
79  virtual void SetCenterWorldPosition(double pos[3]);
80  void SetCenterDisplayPosition(double pos[3]) VTK_OVERRIDE;
81  virtual void SetPoint2WorldPosition(double pos[3]);
82  void SetPoint2DisplayPosition(double pos[3]) VTK_OVERRIDE;
83  void GetPoint1DisplayPosition(double pos[3]) VTK_OVERRIDE;
84  void GetCenterDisplayPosition(double pos[3]) VTK_OVERRIDE;
85  void GetPoint2DisplayPosition(double pos[3]) VTK_OVERRIDE;
87 
89 
94  vtkGetObjectMacro(Ray1,vtkActor);
95  vtkGetObjectMacro(Ray2,vtkActor);
96  vtkGetObjectMacro(Arc,vtkActor);
97  vtkGetObjectMacro(TextActor,vtkFollower);
99 
101 
104  virtual void SetTextActorScale( double scale[3] );
105  virtual double * GetTextActorScale();
107 
112  void BuildRepresentation() VTK_OVERRIDE;
113 
115 
118  void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
119  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
120  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
121  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
123 
124 protected:
126  ~vtkAngleRepresentation3D() VTK_OVERRIDE;
127 
128  // The pieces that make up the angle representations
129  vtkLineSource *Line1Source;
130  vtkLineSource *Line2Source;
131  vtkArcSource *ArcSource;
132  vtkPolyDataMapper *Line1Mapper;
133  vtkPolyDataMapper *Line2Mapper;
134  vtkPolyDataMapper *ArcMapper;
135  vtkActor *Ray1;
136  vtkActor *Ray2;
137  vtkActor *Arc;
138  vtkFollower *TextActor;
139  vtkPolyDataMapper *TextMapper;
140  vtkVectorText *TextInput;
141  double Angle;
142  bool ScaleInitialized;
143  double TextPosition[3];
144 
145 private:
146  vtkAngleRepresentation3D(const vtkAngleRepresentation3D&) VTK_DELETE_FUNCTION;
147  void operator=(const vtkAngleRepresentation3D&) VTK_DELETE_FUNCTION;
148 };
149 
150 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
abstract specification for Viewports
Definition: vtkViewport.h:44
represent surface properties of a geometric object
Definition: vtkProperty.h:58
represent the vtkAngleWidget
create a circular arc
Definition: vtkArcSource.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
a simple class to control print indentation
Definition: vtkIndent.h:33
represent the vtkAngleWidget
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
represent text properties.
create a line defined by two end points
Definition: vtkLineSource.h:36
map vtkPolyData to graphics primitives
a subclass of actor that always faces the camera
Definition: vtkFollower.h:40
virtual double GetAngle()=0
This representation and all subclasses must keep an angle (in degrees) consistent with the state of t...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
create polygonal text
Definition: vtkVectorText.h:41