VTK  9.2.20230606
vtkSphereWidget2.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSphereWidget2.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 =========================================================================*/
112 #ifndef vtkSphereWidget2_h
113 #define vtkSphereWidget2_h
114 
115 #include "vtkAbstractWidget.h"
116 #include "vtkDeprecation.h" // For VTK_DEPRECATED_IN_9_2_0
117 #include "vtkInteractionWidgetsModule.h" // For export macro
118 #include "vtkLegacy.h" // for VTK_LEGACY_REMOVE
119 
120 VTK_ABI_NAMESPACE_BEGIN
122 class vtkHandleWidget;
123 
124 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
125 {
126 public:
131 
133 
137  void PrintSelf(ostream& os, vtkIndent indent) override;
139 
146  {
147  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
148  }
149 
151 
155  vtkSetMacro(TranslationEnabled, vtkTypeBool);
156  vtkGetMacro(TranslationEnabled, vtkTypeBool);
157  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
158  vtkSetMacro(ScalingEnabled, vtkTypeBool);
159  vtkGetMacro(ScalingEnabled, vtkTypeBool);
160  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
162 
168 
173  void SetEnabled(int enabling) override;
174 
175 protected:
177  ~vtkSphereWidget2() override;
178 
179  // Manage the state of the widget
182  {
183  Start = 0,
184  Active
185  };
186 #if !defined(VTK_LEGACY_REMOVE)
187  VTK_DEPRECATED_IN_9_2_0("because leading underscore is reserved")
189 #endif
190 
191  // These methods handle events
197 
198  // Control whether scaling and translation are supported
201 
203  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
204 
205 private:
206  vtkSphereWidget2(const vtkSphereWidget2&) = delete;
207  void operator=(const vtkSphereWidget2&) = delete;
208 };
209 
210 VTK_ABI_NAMESPACE_END
211 #endif
define the API for widget / widget representation
supports function callbacks
a general widget for moving handles
a simple class to control print indentation
Definition: vtkIndent.h:120
abstract base class for most VTK objects
Definition: vtkObject.h:83
a class defining the representation for the vtkSphereWidget2
3D widget for manipulating a point on a sphere
static void TranslateAction(vtkAbstractWidget *)
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
~vtkSphereWidget2() override
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
static void ScaleAction(vtkAbstractWidget *)
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkCallbackCommand * KeyEventCallbackCommand
static vtkSphereWidget2 * New()
Instantiate the object.
static void SelectAction(vtkAbstractWidget *)
static void MoveAction(vtkAbstractWidget *)
void SetRepresentation(vtkSphereRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
vtkTypeBool ScalingEnabled
vtkTypeBool TranslationEnabled
void PrintSelf(ostream &os, vtkIndent indent) override
Standard class methods for type information and printing.
static void EndSelectAction(vtkAbstractWidget *)
abstract class defines interface between the widget and widget representation classes
int vtkTypeBool
Definition: vtkABI.h:71
#define VTK_DEPRECATED_IN_9_2_0(reason)