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=========================================================================*/
92#ifndef vtkTensorWidget_h
93#define vtkTensorWidget_h
94
95#include "vtkAbstractWidget.h"
96#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
97#include "vtkInteractionWidgetsModule.h" // For export macro
98
100
101class VTKINTERACTIONWIDGETS_EXPORT vtkTensorWidget : public vtkAbstractWidget
102{
103public:
105
110 void PrintSelf(ostream& os, vtkIndent indent) override;
112
119 {
120 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
121 }
122
124
132 vtkSetMacro(TranslationEnabled, vtkTypeBool);
133 vtkGetMacro(TranslationEnabled, vtkTypeBool);
134 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
135 vtkSetMacro(ScalingEnabled, vtkTypeBool);
136 vtkGetMacro(ScalingEnabled, vtkTypeBool);
137 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
138 vtkSetMacro(RotationEnabled, vtkTypeBool);
139 vtkGetMacro(RotationEnabled, vtkTypeBool);
140 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
141 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
142 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
143 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
145
151
156 void SetEnabled(int enabling) override;
157
158protected:
161
162 // Manage the state of the widget
165 {
166 Start = 0,
167 Active
168 };
169#if !defined(VTK_LEGACY_REMOVE)
170 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
172#endif
173
174 // These methods handle events
184
185 // Control whether scaling, rotation, and translation are supported
190
192 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
193
194private:
195 vtkTensorWidget(const vtkTensorWidget&) = delete;
196 void operator=(const vtkTensorWidget&) = delete;
197};
198
199#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:57
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
#define VTK_DEPRECATED_IN_9_2_0(reason)