VTK  9.2.20230606
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 =========================================================================*/
63 #ifndef vtkBiDimensionalRepresentation2D_h
64 #define vtkBiDimensionalRepresentation2D_h
65 
67 #include "vtkInteractionWidgetsModule.h" // For export macro
68 
69 VTK_ABI_NAMESPACE_BEGIN
71 class vtkCellArray;
72 class vtkPoints;
73 class vtkPolyData;
75 class vtkTextMapper;
76 class vtkActor2D;
77 class vtkProperty2D;
78 class vtkTextProperty;
79 
80 class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D
82 {
83 public:
88 
90 
94  void PrintSelf(ostream& os, vtkIndent indent) override;
96 
98 
102  vtkGetObjectMacro(LineProperty, vtkProperty2D);
103  vtkGetObjectMacro(SelectedLineProperty, vtkProperty2D);
105 
107 
111  vtkGetObjectMacro(TextProperty, vtkTextProperty);
113 
114  // Used to communicate about the state of the representation
115  enum
116  {
117  Outside = 0,
126  OnCenter
127  };
128 
130 
133  void BuildRepresentation() override;
134  int ComputeInteractionState(int X, int Y, int modify = 0) override;
135  void StartWidgetDefinition(double e[2]) override;
136  void Point2WidgetInteraction(double e[2]) override;
137  void Point3WidgetInteraction(double e[2]) override;
138  void StartWidgetManipulation(double e[2]) override;
139  void WidgetInteraction(double e[2]) override;
140  void Highlight(int highlightOn) override;
142 
144 
148  int RenderOverlay(vtkViewport* viewport) override;
150 
154  char* GetLabelText() override;
155 
157 
160  double* GetLabelPosition() override;
161  void GetLabelPosition(double pos[3]) override;
162  void GetWorldLabelPosition(double pos[3]) override;
164 
165 protected:
168 
169  // Geometry of the lines
177 
178  // The labels for the line lengths
182 
183  // Helper method
185  double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3]);
186 
187 private:
189  void operator=(const vtkBiDimensionalRepresentation2D&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:156
represent the vtkBiDimensionalWidget
void GetLabelPosition(double pos[3]) override
Get the position of the widget's label in display coordinates.
double * GetLabelPosition() override
Get the position of the widget's label in display coordinates.
char * GetLabelText() override
Get the text shown in the widget's label.
static vtkBiDimensionalRepresentation2D * New()
Instantiate the class.
void Point3WidgetInteraction(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
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.
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.
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:297
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:120
represent and manipulate 3D points
Definition: vtkPoints.h:150
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:201
represent surface properties of a 2D image
2D text annotation
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:57
window superclass for vtkRenderWindow
Definition: vtkWindow.h:40
@ dir
Definition: vtkX3D.h:336