VTK
vtkTensorProbeWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTensorProbeWidget.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 =========================================================================*/
34 #ifndef vtkTensorProbeWidget_h
35 #define vtkTensorProbeWidget_h
36 
37 #include "vtkInteractionWidgetsModule.h" // For export macro
38 #include "vtkAbstractWidget.h"
39 
41 class vtkPolyData;
42 
43 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorProbeWidget : public vtkAbstractWidget
44 {
45 public:
49  static vtkTensorProbeWidget *New();
50 
52 
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
65  {
66  this->Superclass::SetWidgetRepresentation(
67  reinterpret_cast<vtkWidgetRepresentation*>(r));
68  }
69 
74  {return reinterpret_cast<vtkTensorProbeRepresentation*>(this->WidgetRep);}
75 
79  void CreateDefaultRepresentation() override;
80 
81 protected:
83  ~vtkTensorProbeWidget() override;
84 
85  // 1 when the probe has been selected, for instance when dragging it around
86  int Selected;
87 
88  int LastEventPosition[2];
89 
90  // Callback interface to capture events and respond
91  static void SelectAction (vtkAbstractWidget*);
92  static void MoveAction (vtkAbstractWidget*);
93  static void EndSelectAction (vtkAbstractWidget*);
94 
95 private:
97  const vtkTensorProbeWidget&) = delete;
98  void operator=(const vtkTensorProbeWidget&) = delete;
99 
100 };
101 
102 #endif
103 
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:85
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:39
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...