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 
154 
159  void SetEnabled(int enabling) override;
160 
161 protected:
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
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
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:119
abstract base class for most VTK objects
Definition: vtkObject.h:82
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
#define VTK_DEPRECATED_IN_9_2_0(reason)