VTK  9.1.0
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=========================================================================*/
50#ifndef vtkBiDimensionalRepresentation2D_h
51#define vtkBiDimensionalRepresentation2D_h
52
54#include "vtkInteractionWidgetsModule.h" // For export macro
55
57class vtkCellArray;
58class vtkPoints;
59class vtkPolyData;
61class vtkTextMapper;
62class vtkActor2D;
63class vtkProperty2D;
64class vtkTextProperty;
65
66class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D
68{
69public:
74
76
80 void PrintSelf(ostream& os, vtkIndent indent) override;
82
84
88 vtkGetObjectMacro(LineProperty, vtkProperty2D);
89 vtkGetObjectMacro(SelectedLineProperty, vtkProperty2D);
91
93
97 vtkGetObjectMacro(TextProperty, vtkTextProperty);
99
100 // Used to communicate about the state of the representation
101 enum
102 {
103 Outside = 0,
112 OnCenter
113 };
114
116
119 void BuildRepresentation() override;
120 int ComputeInteractionState(int X, int Y, int modify = 0) override;
121 void StartWidgetDefinition(double e[2]) override;
122 void Point2WidgetInteraction(double e[2]) override;
123 void Point3WidgetInteraction(double e[2]) override;
124 void StartWidgetManipulation(double e[2]) override;
125 void WidgetInteraction(double e[2]) override;
126 void Highlight(int highlightOn) override;
128
130
134 int RenderOverlay(vtkViewport* viewport) override;
136
140 char* GetLabelText() override;
141
143
146 double* GetLabelPosition() override;
147 void GetLabelPosition(double pos[3]) override;
148 void GetWorldLabelPosition(double pos[3]) override;
150
151protected:
154
155 // Geometry of the lines
163
164 // The labels for the line lengths
168
169 // Helper method
171 double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3]);
172
173private:
175 void operator=(const vtkBiDimensionalRepresentation2D&) = delete;
176};
177
178#endif
a actor that draws 2D data
Definition: vtkActor2D.h:49
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:190
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:43
represent and manipulate 3D points
Definition: vtkPoints.h:43
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:95
represent surface properties of a 2D image
Definition: vtkProperty2D.h:47
2D text annotation
Definition: vtkTextMapper.h:57
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:56
window superclass for vtkRenderWindow
Definition: vtkWindow.h:45
@ dir
Definition: vtkX3D.h:330