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=========================================================================*/
89#ifndef vtkTensorWidget_h
90#define vtkTensorWidget_h
91
92#include "vtkAbstractWidget.h"
93#include "vtkInteractionWidgetsModule.h" // For export macro
94
96
97class VTKINTERACTIONWIDGETS_EXPORT vtkTensorWidget : public vtkAbstractWidget
98{
99public:
101
106 void PrintSelf(ostream& os, vtkIndent indent) override;
108
115 {
116 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
117 }
118
120
128 vtkSetMacro(TranslationEnabled, vtkTypeBool);
129 vtkGetMacro(TranslationEnabled, vtkTypeBool);
130 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
131 vtkSetMacro(ScalingEnabled, vtkTypeBool);
132 vtkGetMacro(ScalingEnabled, vtkTypeBool);
133 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
134 vtkSetMacro(RotationEnabled, vtkTypeBool);
135 vtkGetMacro(RotationEnabled, vtkTypeBool);
136 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
137 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
138 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
139 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
141
147
152 void SetEnabled(int enabling) override;
153
154protected:
157
158 // Manage the state of the widget
161 {
162 Start = 0,
163 Active
164 };
165
166 // These methods handle events
176
177 // Control whether scaling, rotation, and translation are supported
182
184 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
185
186private:
187 vtkTensorWidget(const vtkTensorWidget&) = delete;
188 void operator=(const vtkTensorWidget&) = delete;
189};
190
191#endif
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
class defining a representation for the vtkTensorWidget
3D widget for manipulating a tensor glyph
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 *)
static vtkTensorWidget * New()
Standard methods for instantiation, type information, and printing.
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