VTK  9.0.1
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 =========================================================================*/
87 #ifndef vtkSphereWidget2_h
88 #define vtkSphereWidget2_h
89 
90 #include "vtkAbstractWidget.h"
91 #include "vtkInteractionWidgetsModule.h" // For export macro
92 
94 class vtkHandleWidget;
95 
96 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
97 {
98 public:
103 
105 
109  void PrintSelf(ostream& os, vtkIndent indent) override;
111 
118  {
119  this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));
120  }
121 
123 
127  vtkSetMacro(TranslationEnabled, vtkTypeBool);
128  vtkGetMacro(TranslationEnabled, vtkTypeBool);
129  vtkBooleanMacro(TranslationEnabled, vtkTypeBool);
130  vtkSetMacro(ScalingEnabled, vtkTypeBool);
131  vtkGetMacro(ScalingEnabled, vtkTypeBool);
132  vtkBooleanMacro(ScalingEnabled, vtkTypeBool);
134 
140 
145  void SetEnabled(int enabling) override;
146 
147 protected:
149  ~vtkSphereWidget2() override;
150 
151  // Manage the state of the widget
154  {
155  Start = 0,
156  Active
157  };
158 
159  // These methods handle events
165 
166  // Control whether scaling and translation are supported
169 
171  static void ProcessKeyEvents(vtkObject*, unsigned long, void*, void*);
172 
173 private:
174  vtkSphereWidget2(const vtkSphereWidget2&) = delete;
175  void operator=(const vtkSphereWidget2&) = delete;
176 };
177 
178 #endif
vtkSphereWidget2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSphereWidget2::EndSelectAction
static void EndSelectAction(vtkAbstractWidget *)
vtkHandleWidget
a general widget for moving handles
Definition: vtkHandleWidget.h:73
vtkAbstractWidget.h
vtkSphereWidget2::SetEnabled
void SetEnabled(int enabling) override
Override superclasses' SetEnabled() method because the line widget must enable its internal handle wi...
vtkSphereRepresentation
a class defining the representation for the vtkSphereWidget2
Definition: vtkSphereRepresentation.h:76
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:54
vtkSphereWidget2::ProcessKeyEvents
static void ProcessKeyEvents(vtkObject *, unsigned long, void *, void *)
vtkAbstractWidget
define the API for widget / widget representation
Definition: vtkAbstractWidget.h:63
vtkSphereWidget2::ScalingEnabled
vtkTypeBool ScalingEnabled
Definition: vtkSphereWidget2.h:168
vtkSphereWidget2::KeyEventCallbackCommand
vtkCallbackCommand * KeyEventCallbackCommand
Definition: vtkSphereWidget2.h:170
vtkSphereWidget2::TranslationEnabled
vtkTypeBool TranslationEnabled
Definition: vtkSphereWidget2.h:167
vtkSphereWidget2::~vtkSphereWidget2
~vtkSphereWidget2() override
vtkSphereWidget2
3D widget for manipulating a point on a sphere
Definition: vtkSphereWidget2.h:97
vtkSphereWidget2::SelectAction
static void SelectAction(vtkAbstractWidget *)
vtkSphereWidget2::WidgetState
int WidgetState
Definition: vtkSphereWidget2.h:152
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkSphereWidget2::ScaleAction
static void ScaleAction(vtkAbstractWidget *)
vtkSphereWidget2::New
static vtkSphereWidget2 * New()
Instantiate the object.
vtkSphereWidget2::CreateDefaultRepresentation
void CreateDefaultRepresentation() override
Create the default widget representation if one is not set.
vtkSphereWidget2::vtkSphereWidget2
vtkSphereWidget2()
vtkCallbackCommand
supports function callbacks
Definition: vtkCallbackCommand.h:45
vtkSphereWidget2::MoveAction
static void MoveAction(vtkAbstractWidget *)
vtkSphereWidget2::TranslateAction
static void TranslateAction(vtkAbstractWidget *)
vtkSphereWidget2::SetRepresentation
void SetRepresentation(vtkSphereRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene.
Definition: vtkSphereWidget2.h:117
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkSphereWidget2::_WidgetState
_WidgetState
Definition: vtkSphereWidget2.h:154