VTK  9.0.20210624
vtkBoxWidget2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkBoxWidget2.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 =========================================================================*/
99 #ifndef vtkBoxWidget2_h
100 #define vtkBoxWidget2_h
101 
102 #include "vtkAbstractWidget.h"
103 #include "vtkInteractionWidgetsModule.h" // For export macro
104 
106 class vtkHandleWidget;
107 
108 class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
109 {
110 public:
114  static vtkBoxWidget2* New();
115 
117 
121  void PrintSelf(ostream& os, vtkIndent indent) override;
123 
130  {
131  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
132  }
133 
135 
143  vtkSetMacro(TranslationEnabled, vtkTypeBool);
144  vtkGetMacro(TranslationEnabled, vtkTypeBool);
145  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
146  vtkSetMacro(ScalingEnabled, vtkTypeBool);
147  vtkGetMacro(ScalingEnabled, vtkTypeBool);
148  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
149  vtkSetMacro(RotationEnabled, vtkTypeBool);
150  vtkGetMacro(RotationEnabled, vtkTypeBool);
151  vtkBooleanMacro(RotationEnabled, vtkTypeBool);
152  vtkSetMacro(MoveFacesEnabled, vtkTypeBool);
153  vtkGetMacro(MoveFacesEnabled, vtkTypeBool);
154  vtkBooleanMacro(MoveFacesEnabled, vtkTypeBool);
156 
162 
167  void SetEnabled(int enabling) override;
168 
169 protected:
171  ~vtkBoxWidget2() override;
172 
173  // Manage the state of the widget
176  {
177  Start = 0,
178  Active
179  };
180 
181  // These methods handle events
191 
192  // Control whether scaling, rotation, and translation are supported
197 
199  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
200 
201 private:
202  vtkBoxWidget2(const vtkBoxWidget2&) = delete;
203  void operator=(const vtkBoxWidget2&) = delete;
204 };
205 
206 #endif
vtkBoxWidget2
3D widget for manipulating a box
Definition: vtkBoxWidget2.h:109
vtkBoxWidget2::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkBoxWidget2::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:79
vtkBoxWidget2::WidgetState
int WidgetState
Definition: vtkBoxWidget2.h:174
vtkBoxRepresentation
a class defining the representation for the vtkBoxWidget2
Definition: vtkBoxRepresentation.h:60
vtkAbstractWidget.h
vtkBoxWidget2::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkWidgetRepresentation
abstract class defines interface between the widget and widget representation classes
Definition: vtkWidgetRepresentation.h:60
vtkObject
abstract base class for most VTK objects
Definition: vtkObject.h:63
vtkBoxWidget2::TranslationEnabled
vtkTypeBool TranslationEnabled
Definition: vtkBoxWidget2.h:193
vtkBoxWidget2::MoveAction3D
static void MoveAction3D(vtkAbstractWidget *)
vtkBoxWidget2::ScalingEnabled
vtkTypeBool ScalingEnabled
Definition: vtkBoxWidget2.h:194
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:66
vtkBoxWidget2::ScaleAction
static void ScaleAction(vtkAbstractWidget *)
vtkBoxWidget2::vtkBoxWidget2
vtkBoxWidget2()
vtkBoxWidget2::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition: vtkBoxWidget2.h:198
vtkBoxWidget2::New
static vtkBoxWidget2 * New()
Instantiate the object.
vtkBoxWidget2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
vtkBoxWidget2::SetRepresentation
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkBoxWidget2.h:129
vtkBoxWidget2::EndSelectAction3D
static void EndSelectAction3D(vtkAbstractWidget *)
vtkBoxWidget2::StepAction3D
static void StepAction3D(vtkAbstractWidget *)
vtkBoxWidget2::SelectAction3D
static void SelectAction3D(vtkAbstractWidget *)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkBoxWidget2::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkBoxWidget2::MoveFacesEnabled
vtkTypeBool MoveFacesEnabled
Definition: vtkBoxWidget2.h:196
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:45
vtkBoxWidget2::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkBoxWidget2::~vtkBoxWidget2
~vtkBoxWidget2() override
vtkBoxWidget2::_WidgetState
_WidgetState
Definition: vtkBoxWidget2.h:176
vtkBoxWidget2::RotationEnabled
vtkTypeBool RotationEnabled
Definition: vtkBoxWidget2.h:195
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkBoxWidget2::ProcessKeyEvents
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkBoxWidget2::MoveAction
static void MoveAction(vtkAbstractWidget *)