VTK  9.3.1
vtkTensorProbeWidget.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
22 #ifndef vtkTensorProbeWidget_h
23 #define vtkTensorProbeWidget_h
24 
25 #include "vtkAbstractWidget.h"
26 #include "vtkInteractionWidgetsModule.h" // For export macro
27 
28 VTK_ABI_NAMESPACE_BEGIN
30 class vtkPolyData;
31 
32 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeWidget : public vtkAbstractWidget
33 {
34 public:
38  static vtkTensorProbeWidget* New();
39 
41 
45  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
54  {
55  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
56  }
57 
62  {
63  return reinterpret_cast<vtkTensorProbeRepresentation*>(this->WidgetRep);
64  }
65 
69  void CreateDefaultRepresentation() override;
70 
71 protected:
73  ~vtkTensorProbeWidget() override;
74 
75  // 1 when the probe has been selected, for instance when dragging it around
76  int Selected;
77 
78  int LastEventPosition[2];
79 
80  // Callback interface to capture events and respond
81  static void SelectAction(vtkAbstractWidget*);
82  static void MoveAction(vtkAbstractWidget*);
83  static void EndSelectAction(vtkAbstractWidget*);
84 
85 private:
87  void operator=(const vtkTensorProbeWidget&) = delete;
88 };
89 
90 VTK_ABI_NAMESPACE_END
91 #endif
Abstract class that serves as a representation for vtkTensorProbeWidget.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
a widget to probe tensors on a polyline
concrete dataset represents vertices, lines, polygons, and triangle strips
Definition: vtkPolyData.h:79
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
vtkWidgetRepresentation * WidgetRep
a simple class to control print indentation
Definition: vtkIndent.h:28
define the API for widget / widget representation
vtkTensorProbeRepresentation * GetTensorProbeRepresentation()
Return the representation as a vtkTensorProbeRepresentation.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void SetRepresentation(vtkTensorProbeRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...