VTK  9.2.6
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
48#include "vtkInteractionWidgetsModule.h" // For export macro
49
51class vtkCellArray;
52class vtkPoints;
53class vtkPolyData;
55class vtkTextMapper;
56class vtkActor2D;
57class vtkProperty2D;
58class vtkTextProperty;
59
60class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D
62{
63public:
68
70
74 void PrintSelf(ostream& os, vtkIndent indent) 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
95 enum
96 {
97 Outside = 0,
106 OnCenter
107 };
108
110
113 void BuildRepresentation() override;
114 int ComputeInteractionState(int X, int Y, int modify = 0) override;
115 void StartWidgetDefinition(double e[2]) override;
116 void Point2WidgetInteraction(double e[2]) override;
117 void Point3WidgetInteraction(double e[2]) override;
118 void StartWidgetManipulation(double e[2]) override;
119 void WidgetInteraction(double e[2]) override;
120 void Highlight(int highlightOn) override;
122
124
128 int RenderOverlay(vtkViewport* viewport) override;
130
134 char* GetLabelText() override;
135
137
140 double* GetLabelPosition() override;
141 void GetLabelPosition(double pos[3]) override;
142 void GetWorldLabelPosition(double pos[3]) override;
144
145protected:
148
149 // Geometry of the lines
157
158 // The labels for the line lengths
162
163 // Helper method
165 double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3]);
166
167private:
169 void operator=(const vtkBiDimensionalRepresentation2D&) = delete;
170};
171
172#endif
a actor that draws 2D data
Definition: vtkActor2D.h:46
represent the vtkBiDimensionalWidget
void GetLabelPosition(double pos[3]) override
Get the position of the widget's label in display coordinates.
void Point3WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
static vtkBiDimensionalRepresentation2D * New()
Instantiate the class.
void BuildRepresentation() override
These are methods that satisfy vtkWidgetRepresentation's API.
void ReleaseGraphicsResources(vtkWindow *w) override
Methods required by vtkProp superclass.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
int RenderOverlay(vtkViewport *viewport) override
Methods required by vtkProp superclass.
double * GetLabelPosition() override
Get the position of the widget's label in display coordinates.
void StartWidgetDefinition(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void Highlight(int highlightOn) override
These are methods that satisfy vtkWidgetRepresentation's API.
void Point2WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
char * GetLabelText() override
Get the text shown in the widget's label.
void StartWidgetManipulation(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
int ComputeInteractionState(int X, int Y, int modify=0) override
These are methods that satisfy vtkWidgetRepresentation's API.
void WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void GetWorldLabelPosition(double pos[3]) override
Get the position of the widget's label in display coordinates.
void ProjectOrthogonalPoint(double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3])
represent the vtkBiDimensionalWidget
object to represent cell connectivity
Definition: vtkCellArray.h:187
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:40
represent and manipulate 3D points
Definition: vtkPoints.h:40
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:91
represent surface properties of a 2D image
Definition: vtkProperty2D.h:41
2D text annotation
Definition: vtkTextMapper.h:51
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:39