VTK  9.3.0
vtkBiDimensionalRepresentation2D.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
41 #ifndef vtkBiDimensionalRepresentation2D_h
42 #define vtkBiDimensionalRepresentation2D_h
43 
45 #include "vtkInteractionWidgetsModule.h" // For export macro
46 
47 VTK_ABI_NAMESPACE_BEGIN
49 class vtkCellArray;
50 class vtkPoints;
51 class vtkPolyData;
53 class vtkTextMapper;
54 class vtkActor2D;
55 class vtkProperty2D;
56 class vtkTextProperty;
57 
58 class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D
60 {
61 public:
66 
68 
72  void PrintSelf(ostream& os, vtkIndent indent) override;
74 
76 
80  vtkGetObjectMacro(LineProperty, vtkProperty2D);
81  vtkGetObjectMacro(SelectedLineProperty, vtkProperty2D);
83 
85 
89  vtkGetObjectMacro(TextProperty, vtkTextProperty);
91 
92  // Used to communicate about the state of the representation
93  enum
94  {
95  Outside = 0,
104  OnCenter
105  };
106 
108 
111  void BuildRepresentation() override;
112  int ComputeInteractionState(int X, int Y, int modify = 0) override;
113  void StartWidgetDefinition(double e[2]) override;
114  void Point2WidgetInteraction(double e[2]) override;
115  void Point3WidgetInteraction(double e[2]) override;
116  void StartWidgetManipulation(double e[2]) override;
117  void WidgetInteraction(double e[2]) override;
118  void Highlight(int highlightOn) override;
120 
122 
126  int RenderOverlay(vtkViewport* viewport) override;
128 
132  char* GetLabelText() override;
133 
135 
138  double* GetLabelPosition() override;
139  void GetLabelPosition(double pos[3]) override;
140  void GetWorldLabelPosition(double pos[3]) override;
142 
143 protected:
146 
147  // Geometry of the lines
155 
156  // The labels for the line lengths
160 
161  // Helper method
163  double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3]);
164 
165 private:
167  void operator=(const vtkBiDimensionalRepresentation2D&) = delete;
168 };
169 
170 VTK_ABI_NAMESPACE_END
171 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:44
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:185
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:38
represent and manipulate 3D points
Definition: vtkPoints.h:38
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:89
represent surface properties of a 2D image
Definition: vtkProperty2D.h:39
2D text annotation
Definition: vtkTextMapper.h:49
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:54
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
@ dir
Definition: vtkX3D.h:324