VTK  9.1.0
vtkTensorWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkTensorWidget.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 =========================================================================*/
95 #ifndef vtkTensorWidget_h
96 #define vtkTensorWidget_h
97 
98 #include "vtkAbstractWidget.h"
99 #include "vtkInteractionWidgetsModule.h" // For export macro
100 
102 
103 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorWidget : public vtkAbstractWidget
104 {
105 public:
107 
110  static vtkTensorWidget* New();
112  void PrintSelf(ostream& os, vtkIndent indent) override;
114 
121  {
122  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
123  }
124 
126 
134  vtkSetMacro(TranslationEnabled, vtkTypeBool);
135  vtkGetMacro(TranslationEnabled, vtkTypeBool);
136  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
137  vtkSetMacro(ScalingEnabled, vtkTypeBool);
138  vtkGetMacro(ScalingEnabled, vtkTypeBool);
139  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
140  vtkSetMacro(RotationEnabled, vtkTypeBool);
141  vtkGetMacro(RotationEnabled, vtkTypeBool);
142  vtkBooleanMacro(RotationEnabled, vtkTypeBool);
143  vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
144  vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
145  vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
147 
153 
158  void SetEnabled(int enabling) override;
159 
160 protected:
162  ~vtkTensorWidget() override;
163 
164  // Manage the state of the widget
167  {
168  Start = 0,
169  Active
170  };
171 
172  // These methods handle events
182 
183  // Control whether scaling, rotation, and translation are supported
188 
190  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
191 
192 private:
193  vtkTensorWidget(const vtkTensorWidget&) = delete;
194  void operator=(const vtkTensorWidget&) = delete;
195 };
196 
197 #endif
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:34
abstract base class for most VTK objects
Definition: vtkObject.h:63
class defining a representation for the vtkTensorWidget
3D widget for manipulating a tensor glyph
static vtkTensorWidget * New()
Standard methods for instantiation, type information, and printing.
static void SelectAction(vtkAbstractWidget *)
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkCallbackCommand * KeyEventCallbackCommand
vtkTypeBool MoveFacesEnabled
~vtkTensorWidget() override
static void MoveAction3D(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
vtkTypeBool RotationEnabled
static void ScaleAction(vtkAbstractWidget *)
static void TranslateAction(vtkAbstractWidget *)
void SetRepresentation(vtkTensorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
static void EndSelectAction3D(vtkAbstractWidget *)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
static void SelectAction3D(vtkAbstractWidget *)
vtkTypeBool ScalingEnabled
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
static void StepAction3D(vtkAbstractWidget *)
static void EndSelectAction(vtkAbstractWidget *)
vtkTypeBool TranslationEnabled
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:69