VTK  9.0.1
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 =========================================================================*/
41 #ifndef vtkBiDimensionalRepresentation2D_h
42 #define vtkBiDimensionalRepresentation2D_h
43 
45 #include "vtkInteractionWidgetsModule.h" // For export macro
46 
48 class vtkCellArray;
49 class vtkPoints;
50 class vtkPolyData;
52 class vtkTextMapper;
53 class vtkActor2D;
54 class vtkProperty2D;
55 class vtkTextProperty;
56 
57 class VTKINTERACTIONWIDGETS_EXPORT vtkBiDimensionalRepresentation2D
59 {
60 public:
65 
67 
71  void PrintSelf(ostream& os, vtkIndent indent) override;
73 
75 
79  vtkGetObjectMacro(LineProperty, vtkProperty2D);
80  vtkGetObjectMacro(SelectedLineProperty, vtkProperty2D);
82 
84 
88  vtkGetObjectMacro(TextProperty, vtkTextProperty);
90 
91  // Used to communicate about the state of the representation
92  enum
93  {
94  Outside = 0,
103  OnCenter
104  };
105 
107 
110  void BuildRepresentation() override;
111  int ComputeInteractionState(int X, int Y, int modify = 0) override;
112  void StartWidgetDefinition(double e[2]) override;
113  void Point2WidgetInteraction(double e[2]) override;
114  void Point3WidgetInteraction(double e[2]) override;
115  void StartWidgetManipulation(double e[2]) override;
116  void WidgetInteraction(double e[2]) override;
117  void Highlight(int highlightOn) override;
119 
121 
125  int RenderOverlay(vtkViewport* viewport) override;
127 
131  char* GetLabelText() override;
132 
134 
137  double* GetLabelPosition() override;
138  void GetLabelPosition(double pos[3]) override;
139  void GetWorldLabelPosition(double pos[3]) override;
141 
142 protected:
145 
146  // Geometry of the lines
154 
155  // The labels for the line lengths
159 
160  // Helper method
162  double x[4], double y[3], double x1[3], double x2[3], double x21[3], double dir, double xP[3]);
163 
164 private:
166  void operator=(const vtkBiDimensionalRepresentation2D&) = delete;
167 };
168 
169 #endif
a actor that draws 2D data
Definition: vtkActor2D.h:40
represent the vtkBiDimensionalWidget
void GetLabelPosition(double pos[3]) override
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
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
Methods invoked by print to print information about the object including superclasses.
int RenderOverlay(vtkViewport *viewport) override
void StartWidgetDefinition(double e[2]) override
These are methods that satisfy vtkWidgetRepresentation's API.
void Highlight(int highlightOn) override
void Point2WidgetInteraction(double e[2]) override
void StartWidgetManipulation(double e[2]) override
int ComputeInteractionState(int X, int Y, int modify=0) override
void WidgetInteraction(double e[2]) override
void GetWorldLabelPosition(double pos[3]) override
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:180
abstract class for representing widget handles
a simple class to control print indentation
Definition: vtkIndent.h:34
represent and manipulate 3D points
Definition: vtkPoints.h:34
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:85
represent surface properties of a 2D image
Definition: vtkProperty2D.h:38
2D text annotation
Definition: vtkTextMapper.h:48
represent text properties.
abstract specification for Viewports
Definition: vtkViewport.h:45
window superclass for vtkRenderWindow
Definition: vtkWindow.h:38
@ dir
Definition: vtkX3D.h:330