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 "vtkAngleRepresentation.h"
35 #include "vtkInteractionWidgetsModule.h" // For export macro
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) override;
62 
66  double GetAngle() override;
67 
69 
74  void GetPoint1WorldPosition(double pos[3]) override;
75  void GetCenterWorldPosition(double pos[3]) override;
76  void GetPoint2WorldPosition(double pos[3]) override;
77  virtual void SetPoint1WorldPosition(double pos[3]);
78  void SetPoint1DisplayPosition(double pos[3]) override;
79  virtual void SetCenterWorldPosition(double pos[3]);
80  void SetCenterDisplayPosition(double pos[3]) override;
81  virtual void SetPoint2WorldPosition(double pos[3]);
82  void SetPoint2DisplayPosition(double pos[3]) override;
83  void GetPoint1DisplayPosition(double pos[3]) override;
84  void GetCenterDisplayPosition(double pos[3]) override;
85  void GetPoint2DisplayPosition(double pos[3]) 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() override;
113 
115 
118  void ReleaseGraphicsResources(vtkWindow* w) override;
119  int RenderOpaqueGeometry(vtkViewport*) override;
123 
124 protected:
126  ~vtkAngleRepresentation3D() override;
127 
128  // The pieces that make up the angle representations
141  double Angle;
143  double TextPosition[3];
144 
145 private:
147  void operator=(const vtkAngleRepresentation3D&) = delete;
148 };
149 
150 #endif
vtkPolyDataMapper
map vtkPolyData to graphics primitives
Definition: vtkPolyDataMapper.h:36
vtkFollower
a subclass of actor that always faces the camera
Definition: vtkFollower.h:40
vtkAngleRepresentation3D::TextMapper
vtkPolyDataMapper * TextMapper
Definition: vtkAngleRepresentation3D.h:139
vtkAngleRepresentation::GetCenterDisplayPosition
virtual void GetCenterDisplayPosition(double pos[3])=0
vtkAngleRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkX3D::scale
Definition: vtkX3D.h:235
vtkAngleRepresentation3D::Ray2
vtkActor * Ray2
Definition: vtkAngleRepresentation3D.h:136
vtkAngleRepresentation.h
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkAngleRepresentation3D::ArcSource
vtkArcSource * ArcSource
Definition: vtkAngleRepresentation3D.h:131
vtkAngleRepresentation::SetPoint2DisplayPosition
virtual void SetPoint2DisplayPosition(double pos[3])=0
vtkAngleRepresentation3D::Line1Source
vtkLineSource * Line1Source
Definition: vtkAngleRepresentation3D.h:129
vtkAngleRepresentation::BuildRepresentation
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
vtkAngleRepresentation::GetAngle
virtual double GetAngle()=0
This representation and all subclasses must keep an angle (in degrees) consistent with the state of t...
vtkAngleRepresentation3D::Line1Mapper
vtkPolyDataMapper * Line1Mapper
Definition: vtkAngleRepresentation3D.h:132
vtkVectorText
create polygonal text
Definition: vtkVectorText.h:41
vtkArcSource
create a circular arc
Definition: vtkArcSource.h:45
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkAngleRepresentation3D::ArcMapper
vtkPolyDataMapper * ArcMapper
Definition: vtkAngleRepresentation3D.h:134
vtkWidgetRepresentation::RenderTranslucentPolygonalGeometry
int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:216
vtkWidgetRepresentation::ReleaseGraphicsResources
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
Definition: vtkWidgetRepresentation.h:213
vtkAngleRepresentation3D::ScaleInitialized
bool ScaleInitialized
Definition: vtkAngleRepresentation3D.h:142
vtkAngleRepresentation::GetPoint2WorldPosition
virtual void GetPoint2WorldPosition(double pos[3])=0
vtkActor
represents an object (geometry & properties) in a rendered scene
Definition: vtkActor.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkAngleRepresentation3D::TextActor
vtkFollower * TextActor
Definition: vtkAngleRepresentation3D.h:138
vtkAngleRepresentation3D::Angle
double Angle
Definition: vtkAngleRepresentation3D.h:141
vtkLineSource
create a line defined by two end points
Definition: vtkLineSource.h:36
vtkAngleRepresentation3D::Line2Source
vtkLineSource * Line2Source
Definition: vtkAngleRepresentation3D.h:130
vtkViewport
abstract specification for Viewports
Definition: vtkViewport.h:44
vtkAngleRepresentation3D
represent the vtkAngleWidget
Definition: vtkAngleRepresentation3D.h:47
vtkTextProperty
represent text properties.
Definition: vtkTextProperty.h:33
vtkAngleRepresentation::SetPoint1DisplayPosition
virtual void SetPoint1DisplayPosition(double pos[3])=0
vtkWidgetRepresentation::RenderOpaqueGeometry
int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport)) override
Definition: vtkWidgetRepresentation.h:215
vtkAngleRepresentation3D::Ray1
vtkActor * Ray1
Definition: vtkAngleRepresentation3D.h:135
vtkAngleRepresentation3D::Arc
vtkActor * Arc
Definition: vtkAngleRepresentation3D.h:137
vtkAngleRepresentation::GetPoint1DisplayPosition
virtual void GetPoint1DisplayPosition(double pos[3])=0
vtkAngleRepresentation::GetPoint2DisplayPosition
virtual void GetPoint2DisplayPosition(double pos[3])=0
vtkAngleRepresentation3D::Line2Mapper
vtkPolyDataMapper * Line2Mapper
Definition: vtkAngleRepresentation3D.h:133
vtkAngleRepresentation::GetCenterWorldPosition
virtual void GetCenterWorldPosition(double pos[3])=0
vtkProperty
represent surface properties of a geometric object
Definition: vtkProperty.h:61
vtkWidgetRepresentation::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THESE METHODS OUTSIDE OF THE RENDE...
Definition: vtkWidgetRepresentation.h:218
vtkAngleRepresentation3D::TextInput
vtkVectorText * TextInput
Definition: vtkAngleRepresentation3D.h:140
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkAngleRepresentation::SetCenterDisplayPosition
virtual void SetCenterDisplayPosition(double pos[3])=0
vtkAngleRepresentation
represent the vtkAngleWidget
Definition: vtkAngleRepresentation.h:38
vtkAngleRepresentation::GetPoint1WorldPosition
virtual void GetPoint1WorldPosition(double pos[3])=0
Methods to Set/Get the coordinates of the three points defining this representation.