VTK
vtkBiDimensionalRepresentation2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBiDimensionalRepresentation2D.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 =========================================================================*/
44 #ifndef vtkBiDimensionalRepresentation2D_h
45 #define vtkBiDimensionalRepresentation2D_h
46 
47 #include "vtkInteractionWidgetsModule.h" // For export macro
49 
51 class vtkCellArray;
52 class vtkPoints;
53 class vtkPolyData;
55 class vtkTextMapper;
56 class vtkActor2D;
57 class vtkProperty2D;
58 class vtkTextProperty;
59 
60 
61 class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D : public vtkBiDimensionalRepresentation
62 {
63 public:
68 
70 
74  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
76 
78 
82  vtkGetObjectMacro(LineProperty,vtkProperty2D);
83  vtkGetObjectMacro(SelectedLineProperty,vtkProperty2D);
85 
87 
91  vtkGetObjectMacro(TextProperty,vtkTextProperty);
93 
94  // Used to communicate about the state of the representation
96 
98 
101  void BuildRepresentation() VTK_OVERRIDE;
102  int ComputeInteractionState(int X, int Y, int modify=0) VTK_OVERRIDE;
103  void StartWidgetDefinition(double e[2]) VTK_OVERRIDE;
104  void Point2WidgetInteraction(double e[2]) VTK_OVERRIDE;
105  void Point3WidgetInteraction(double e[2]) VTK_OVERRIDE;
106  void StartWidgetManipulation(double e[2]) VTK_OVERRIDE;
107  void WidgetInteraction(double e[2]) VTK_OVERRIDE;
108  void Highlight(int highlightOn) VTK_OVERRIDE;
110 
112 
115  void ReleaseGraphicsResources(vtkWindow *w) VTK_OVERRIDE;
116  int RenderOverlay(vtkViewport *viewport) VTK_OVERRIDE;
118 
122  char* GetLabelText() VTK_OVERRIDE;
123 
125 
128  double* GetLabelPosition() VTK_OVERRIDE;
129  void GetLabelPosition(double pos[3]) VTK_OVERRIDE;
130  void GetWorldLabelPosition(double pos[3]) VTK_OVERRIDE;
132 
133 protected:
135  ~vtkBiDimensionalRepresentation2D() VTK_OVERRIDE;
136 
137  // Geometry of the lines
145 
146  // The labels for the line lengths
150 
151  // Helper method
152  void ProjectOrthogonalPoint(double x[4], double y[3], double x1[3], double x2[3], double x21[3],
153  double dir, double xP[3]);
154 
155 private:
157  void operator=(const vtkBiDimensionalRepresentation2D&) VTK_DELETE_FUNCTION;
158 };
159 
160 #endif
virtual int ComputeInteractionState(int X, int Y, int modify=0)
abstract class for representing widget handles
represent the vtkBiDimensionalWidget
abstract specification for Viewports
Definition: vtkViewport.h:47
a actor that draws 2D data
Definition: vtkActor2D.h:45
virtual void Point3WidgetInteraction(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
virtual double * GetLabelPosition()=0
Get the position of the widget's label in display coordinates.
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
virtual void BuildRepresentation()=0
Subclasses of vtkWidgetRepresentation must implement these methods.
2D text annotation
Definition: vtkTextMapper.h:53
represent the vtkBiDimensionalWidget
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
virtual void StartWidgetManipulation(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void Point2WidgetInteraction(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
virtual void StartWidgetDefinition(double e[2])=0
These are methods that satisfy vtkWidgetRepresentation's API.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
a simple class to control print indentation
Definition: vtkIndent.h:39
void ReleaseGraphicsResources(vtkWindow *) override
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE Release any graphics resources that are being...
virtual void WidgetInteraction(double newEventPos[2])
virtual char * GetLabelText()=0
Get the text shown in the widget's label.
represent text properties.
int RenderOverlay(vtkViewport *vtkNotUsed(viewport)) override
object to represent cell connectivity
Definition: vtkCellArray.h:50
virtual void GetWorldLabelPosition(double pos[3])=0
Get the position of the widget's label in display coordinates.
virtual void Highlight(int vtkNotUsed(highlightOn))
represent surface properties of a 2D image
Definition: vtkProperty2D.h:40
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
draw vtkPolyData onto the image plane
represent and manipulate 3D points
Definition: vtkPoints.h:39