VTK  9.2.6
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 "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
100 #include "vtkInteractionWidgetsModule.h" // For export macro
101 
103 
104 class VTKINTERACTIONWIDGETS_EXPORT vtkTensorWidget : public vtkAbstractWidget
105 {
106 public:
108 
111  static vtkTensorWidget* New();
113  void PrintSelf(ostream& os, vtkIndent indent) override;
115 
122  {
123  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
124  }
125 
127 
135  vtkSetMacro(TranslationEnabled, vtkTypeBool);
136  vtkGetMacro(TranslationEnabled, vtkTypeBool);
137  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
138  vtkSetMacro(ScalingEnabled, vtkTypeBool);
139  vtkGetMacro(ScalingEnabled, vtkTypeBool);
140  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
141  vtkSetMacro(RotationEnabled, vtkTypeBool);
142  vtkGetMacro(RotationEnabled, vtkTypeBool);
143  vtkBooleanMacro(RotationEnabled, vtkTypeBool);
144  vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
145  vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
146  vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
148 
153  void CreateDefaultRepresentation() override;
154 
159  void SetEnabled(int enabling) override;
160 
161 protected:
162  vtkTensorWidget();
163  ~vtkTensorWidget() override;
164 
165  // Manage the state of the widget
168  {
169  Start = 0,
170  Active
171  };
172 #if !defined(VTK_LEGACY_REMOVE)
173  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
175 #endif
176 
177  // These methods handle events
178  static void SelectAction(vtkAbstractWidget*);
179  static void EndSelectAction(vtkAbstractWidget*);
180  static void TranslateAction(vtkAbstractWidget*);
181  static void ScaleAction(vtkAbstractWidget*);
182  static void MoveAction(vtkAbstractWidget*);
183  static void SelectAction3D(vtkAbstractWidget*);
184  static void EndSelectAction3D(vtkAbstractWidget*);
185  static void MoveAction3D(vtkAbstractWidget*);
186  static void StepAction3D(vtkAbstractWidget*);
187 
188  // Control whether scaling, rotation, and translation are supported
193 
195  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
196 
197 private:
198  vtkTensorWidget(const vtkTensorWidget&) = delete;
199  void operator=(const vtkTensorWidget&) = delete;
200 };
201 
202 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkTypeBool ScalingEnabled
#define VTK_DEPRECATED_IN_9_2_0(reason)
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
vtkTypeBool RotationEnabled
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
int vtkTypeBool
Definition: vtkABI.h:69
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:39
class defining a representation for the vtkTensorWidget
vtkCallbackCommand * KeyEventCallbackCommand
define the API for widget / widget representation
void SetEnabled(int) override
Methods for activating this widget.
vtkTypeBool TranslationEnabled
void SetRepresentation(vtkTensorRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkTypeBool MoveFacesEnabled
3D widget for manipulating a tensor glyph