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 =========================================================================*/
34 #ifndef vtkAngleRepresentation3D_h
35 #define vtkAngleRepresentation3D_h
36 
37 #include "vtkInteractionWidgetsModule.h" // For export macro
38 #include "vtkAngleRepresentation.h"
39 
40 class vtkActor;
41 class vtkProperty;
42 class vtkPolyDataMapper;
43 class vtkLineSource;
44 class vtkArcSource;
45 class vtkFollower;
46 class vtkVectorText;
47 class vtkPolyDataMapper;
48 class vtkTextProperty;
49 
50 class VTKINTERACTIONWIDGETS_EXPORT vtkAngleRepresentation3D : public vtkAngleRepresentation
51 {
52 public:
56  static vtkAngleRepresentation3D *New();
57 
59 
63  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
65 
69  double GetAngle() VTK_OVERRIDE;
70 
72 
77  void GetPoint1WorldPosition(double pos[3]) VTK_OVERRIDE;
78  void GetCenterWorldPosition(double pos[3]) VTK_OVERRIDE;
79  void GetPoint2WorldPosition(double pos[3]) VTK_OVERRIDE;
80  virtual void SetPoint1WorldPosition(double pos[3]);
81  void SetPoint1DisplayPosition(double pos[3]) VTK_OVERRIDE;
82  virtual void SetCenterWorldPosition(double pos[3]);
83  void SetCenterDisplayPosition(double pos[3]) VTK_OVERRIDE;
84  virtual void SetPoint2WorldPosition(double pos[3]);
85  void SetPoint2DisplayPosition(double pos[3]) VTK_OVERRIDE;
86  void GetPoint1DisplayPosition(double pos[3]) VTK_OVERRIDE;
87  void GetCenterDisplayPosition(double pos[3]) VTK_OVERRIDE;
88  void GetPoint2DisplayPosition(double pos[3]) VTK_OVERRIDE;
90 
92 
97  vtkGetObjectMacro(Ray1,vtkActor);
98  vtkGetObjectMacro(Ray2,vtkActor);
99  vtkGetObjectMacro(Arc,vtkActor);
100  vtkGetObjectMacro(TextActor,vtkFollower);
102 
104 
107  virtual void SetTextActorScale( double scale[3] );
108  virtual double * GetTextActorScale();
110 
115  void BuildRepresentation() VTK_OVERRIDE;
116 
118 
121  void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
122  int RenderOpaqueGeometry(vtkViewport*) VTK_OVERRIDE;
123  int RenderTranslucentPolygonalGeometry(vtkViewport*) VTK_OVERRIDE;
124  int HasTranslucentPolygonalGeometry() VTK_OVERRIDE;
126 
127 protected:
129  ~vtkAngleRepresentation3D() VTK_OVERRIDE;
130 
131  // The pieces that make up the angle representations
132  vtkLineSource *Line1Source;
133  vtkLineSource *Line2Source;
134  vtkArcSource *ArcSource;
135  vtkPolyDataMapper *Line1Mapper;
136  vtkPolyDataMapper *Line2Mapper;
137  vtkPolyDataMapper *ArcMapper;
138  vtkActor *Ray1;
139  vtkActor *Ray2;
140  vtkActor *Arc;
141  vtkFollower *TextActor;
142  vtkPolyDataMapper *TextMapper;
143  vtkVectorText *TextInput;
144  double Angle;
145  bool ScaleInitialized;
146  double TextPosition[3];
147 
148 private:
149  vtkAngleRepresentation3D(const vtkAngleRepresentation3D&) VTK_DELETE_FUNCTION;
150  void operator=(const vtkAngleRepresentation3D&) VTK_DELETE_FUNCTION;
151 };
152 
153 #endif
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:51
abstract specification for Viewports
Definition: vtkViewport.h:47
represent surface properties of a geometric object
Definition: vtkProperty.h:64
represent the vtkAngleWidget
create a circular arc
Definition: vtkArcSource.h:48
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
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:42
map vtkPolyData to graphics primitives
a subclass of actor that always faces the camera
Definition: vtkFollower.h:46
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:47