Thanks to visit codestin.com
Credit goes to vtk.org

VTK  9.5.20251001
vtkBoxWidget2.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
106#ifndef vtkBoxWidget2_h
107#define vtkBoxWidget2_h
108
109#include "vtkAbstractWidget.h"
110#include "vtkBoxRepresentation.h"
111#include "vtkInteractionWidgetsModule.h" // For export macro
112#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
113
114VTK_ABI_NAMESPACE_BEGIN
116class vtkHandleWidget;
117
118class VTKINTERACTIONWIDGETS_EXPORT VTK_MARSHALAUTO vtkBoxWidget2 : public vtkAbstractWidget
119{
120public:
125
127
131 void PrintSelf(ostream& os, vtkIndent indent) override;
133
140 {
141 this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
142 }
143
145
153 vtkSetMacro(TranslationEnabled, vtkTypeBool);
154 vtkGetMacro(TranslationEnabled, vtkTypeBool);
155 vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
156 vtkSetMacro(ScalingEnabled, vtkTypeBool);
157 vtkGetMacro(ScalingEnabled, vtkTypeBool);
158 vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
159 vtkSetMacro(RotationEnabled, vtkTypeBool);
160 vtkGetMacro(RotationEnabled, vtkTypeBool);
161 vtkBooleanMacro(RotationEnabled, vtkTypeBool);
162 vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
163 vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
164 vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
166
172
177 void SetEnabled(int enabling) override;
178
180
185 void SetRotationAxisMode(int mode);
188 void SetRotationAxisModeToX() { this->SetRotationAxisMode(vtkBoxRepresentation::ROTATE_X); }
189 void SetRotationAxisModeToY() { this->SetRotationAxisMode(vtkBoxRepresentation::ROTATE_Y); }
190 void SetRotationAxisModeToZ() { this->SetRotationAxisMode(vtkBoxRepresentation::ROTATE_Z); }
192
193protected:
195 ~vtkBoxWidget2() override;
196
197 // Manage the state of the widget
200 {
201 Start = 0,
202 Active
203 };
204
205 // These methods handle events
215
216 // Control whether scaling, rotation, and translation are supported
221
223 static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
224
225private:
226 vtkBoxWidget2(const vtkBoxWidget2&) = delete;
227 void operator=(const vtkBoxWidget2&) = delete;
228};
229
230VTK_ABI_NAMESPACE_END
231#endif
define the API for widget / widget representation
a class defining the representation for the vtkBoxWidget2
3D widget for manipulating a box
vtkTypeBool MoveFacesEnabled
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
void SetRotationAxisModeToX()
Get/Set the rotation mode of the box.
int GetRotationAxisMode()
Get/Set the rotation mode of the box.
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
static void SelectAction3D(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
void SetRotationAxisModeToFree()
Get/Set the rotation mode of the box.
static void ScaleAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
~vtkBoxWidget2() override
void SetRotationAxisModeToZ()
Get/Set the rotation mode of the box.
static void SelectAction(vtkAbstractWidget *)
void SetRotationAxisModeToY()
Get/Set the rotation mode of the box.
static void EndSelectAction(vtkAbstractWidget *)
static void EndSelectAction3D(vtkAbstractWidget *)
void SetRotationAxisMode(int mode)
Get/Set the rotation mode of the box.
static void TranslateAction(vtkAbstractWidget *)
vtkTypeBool TranslationEnabled
vtkTypeBool RotationEnabled
static void MoveAction3D(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
static vtkBoxWidget2 * New()
Instantiate the object.
vtkTypeBool ScalingEnabled
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
vtkCallbackCommand * KeyEventCallbackCommand
static void StepAction3D(vtkAbstractWidget *)
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_MARSHALAUTO