VTK  9.3.20240328
vtkSphereWidget2.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
100 #ifndef vtkSphereWidget2_h
101 #define vtkSphereWidget2_h
102 
103 #include "vtkAbstractWidget.h"
104 #include "vtkInteractionWidgetsModule.h" // For export macro
105 
106 VTK_ABI_NAMESPACE_BEGIN
108 class vtkHandleWidget;
109 
110 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
111 {
112 public:
117 
119 
123  void PrintSelf(ostream& os, vtkIndent indent) override;
125 
132  {
133  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
134  }
135 
137 
141  vtkSetMacro(TranslationEnabled, vtkTypeBool);
142  vtkGetMacro(TranslationEnabled, vtkTypeBool);
143  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
144  vtkSetMacro(ScalingEnabled, vtkTypeBool);
145  vtkGetMacro(ScalingEnabled, vtkTypeBool);
146  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
148 
154 
159  void SetEnabled(int enabling) override;
160 
161 protected:
163  ~vtkSphereWidget2() override;
164 
165  // Manage the state of the widget
168  {
169  Start = 0,
170  Active
171  };
172 
173  // These methods handle events
179 
180  // Control whether scaling and translation are supported
183 
185  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
186 
187 private:
188  vtkSphereWidget2(const vtkSphereWidget2&) = delete;
189  void operator=(const vtkSphereWidget2&) = delete;
190 };
191 
192 VTK_ABI_NAMESPACE_END
193 #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:108
abstract base class for most VTK objects
Definition: vtkObject.h:161
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:64