VTK  9.3.0
vtkTensorWidget.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
80#ifndef vtkTensorWidget_h
81#define vtkTensorWidget_h
82
83#include "vtkAbstractWidget.h"
84#include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
85#include "vtkInteractionWidgetsModule.h" // For export macro
86#include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
87
88VTK_ABI_NAMESPACE_BEGIN
90
91class VTKINTERACTIONWIDGETS_EXPORT vtkTensorWidget : public vtkAbstractWidget
92{
93public:
95
100 void PrintSelf(ostream& os, vtkIndent indent) override;
102
109 {
110 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
111 }
112
114
122 vtkSetMacro(TranslationEnabled, vtkTypeBool);
123 vtkGetMacro(TranslationEnabled, vtkTypeBool);
124 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
125 vtkSetMacro(ScalingEnabled, vtkTypeBool);
126 vtkGetMacro(ScalingEnabled, vtkTypeBool);
127 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
128 vtkSetMacro(RotationEnabled, vtkTypeBool);
129 vtkGetMacro(RotationEnabled, vtkTypeBool);
130 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
131 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
132 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
133 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
135
141
146 void SetEnabled(int enabling) override;
147
148protected:
151
152 // Manage the state of the widget
155 {
156 Start = 0,
157 Active
158 };
159#if !defined(VTK_LEGACY_REMOVE)
160 VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
162#endif
163
164 // These methods handle events
174
175 // Control whether scaling, rotation, and translation are supported
180
182 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
183
184private:
185 vtkTensorWidget(const vtkTensorWidget&) = delete;
186 void operator=(const vtkTensorWidget&) = delete;
187};
188
189VTK_ABI_NAMESPACE_END
190#endif
define the API for widget / widget representation
supports function callbacks
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
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:64
#define VTK_DEPRECATED_IN_9_2_0(reason)