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
vtkTensorWidget::SetRepresentation
void SetRepresentation(vtkTensorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkTensorWidget.h:120
vtkTensorWidget::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkAbstractWidget.h
vtkTensorWidget::SelectAction3D
static void SelectAction3D(vtkAbstractWidget *)
vtkTensorWidget::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition: vtkTensorWidget.h:189
vtkTensorWidget::_WidgetState
_WidgetState
Definition: vtkTensorWidget.h:167
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:82
vtkTensorWidget::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkTensorWidget::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkTensorWidget::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
vtkTensorWidget::MoveAction3D
static void MoveAction3D(vtkAbstractWidget *)
vtkTensorWidget::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:66
vtkTensorWidget::ProcessKeyEvents
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkTensorWidget::WidgetState
int WidgetState
Definition: vtkTensorWidget.h:165
vtkTensorWidget::MoveFacesEnabled
vtkTypeBool MoveFacesEnabled
Definition: vtkTensorWidget.h:187
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkTensorWidget::ScalingEnabled
vtkTypeBool ScalingEnabled
Definition: vtkTensorWidget.h:185
vtkTensorWidget::vtkTensorWidget
vtkTensorWidget()
vtkTensorWidget::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkTensorWidget::StepAction3D
static void StepAction3D(vtkAbstractWidget *)
vtkTensorWidget::New
static vtkTensorWidget * New()
Standard methods for instantiation, type information, and printing.
vtkTensorWidget::~vtkTensorWidget
~vtkTensorWidget() override
vtkTensorWidget::ScaleAction
static void ScaleAction(vtkAbstractWidget *)
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:154
vtkTensorWidget
3D widget for manipulating a tensor glyph
Definition: vtkTensorWidget.h:104
vtkTensorRepresentation
class defining a representation for the vtkTensorWidget
Definition: vtkTensorRepresentation.h:67
vtkTensorWidget::RotationEnabled
vtkTypeBool RotationEnabled
Definition: vtkTensorWidget.h:186
vtkTensorWidget::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkTensorWidget::EndSelectAction3D
static void EndSelectAction3D(vtkAbstractWidget *)
vtkTensorWidget::TranslationEnabled
vtkTypeBool TranslationEnabled
Definition: vtkTensorWidget.h:184
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69