VTK
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 =========================================================================*/
93 #ifndef vtkBoxWidget2_h
94 #define vtkBoxWidget2_h
95 
96 #include "vtkInteractionWidgetsModule.h" // For export macro
97 #include "vtkAbstractWidget.h"
98 
100 class vtkHandleWidget;
101 
102 
103 class VTKINTERACTIONWIDGETS_EXPORT vtkBoxWidget2 : public vtkAbstractWidget
104 {
105 public:
109  static vtkBoxWidget2 *New();
110 
112 
116  void PrintSelf(ostream& os, vtkIndent indent) override;
118 
125  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
126 
128 
136  vtkSetMacro(TranslationEnabled,vtkTypeBool);
137  vtkGetMacro(TranslationEnabled,vtkTypeBool);
138  vtkBooleanMacro(TranslationEnabled,vtkTypeBool);
139  vtkSetMacro(ScalingEnabled,vtkTypeBool);
140  vtkGetMacro(ScalingEnabled,vtkTypeBool);
141  vtkBooleanMacro(ScalingEnabled,vtkTypeBool);
142  vtkSetMacro(RotationEnabled,vtkTypeBool);
143  vtkGetMacro(RotationEnabled,vtkTypeBool);
144  vtkBooleanMacro(RotationEnabled,vtkTypeBool);
145  vtkSetMacro(MoveFacesEnabled,vtkTypeBool);
146  vtkGetMacro(MoveFacesEnabled,vtkTypeBool);
147  vtkBooleanMacro(MoveFacesEnabled,vtkTypeBool);
149 
154  void CreateDefaultRepresentation() override;
155 
156 protected:
157  vtkBoxWidget2();
158  ~vtkBoxWidget2() override;
159 
160  // Manage the state of the widget
162  enum _WidgetState {Start=0,Active};
163 
164  // These methods handle events
165  static void SelectAction(vtkAbstractWidget*);
166  static void EndSelectAction(vtkAbstractWidget*);
167  static void TranslateAction(vtkAbstractWidget*);
168  static void ScaleAction(vtkAbstractWidget*);
169  static void MoveAction(vtkAbstractWidget*);
170 
171  // Control whether scaling, rotation, and translation are supported
176 private:
177  vtkBoxWidget2(const vtkBoxWidget2&) = delete;
178  void operator=(const vtkBoxWidget2&) = delete;
179 };
180 
181 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
vtkTypeBool ScalingEnabled
a class defining the representation for the vtkBoxWidget2
a general widget for moving handles
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
void SetRepresentation(vtkBoxRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:33
3D widget for manipulating a box
define the API for widget / widget representation
vtkTypeBool TranslationEnabled
vtkTypeBool MoveFacesEnabled
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkTypeBool RotationEnabled