VTK
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 "vtkInteractionWidgetsModule.h" // For export macro
91 #include "vtkAbstractWidget.h"
92 
94 class vtkHandleWidget;
95 
96 
97 class VTKINTERACTIONWIDGETS_EXPORT vtkSphereWidget2 : public vtkAbstractWidget
98 {
99 public:
103  static vtkSphereWidget2 *New();
104 
106 
110  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
112 
119  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
120 
122 
126  vtkSetMacro(TranslationEnabled,int);
127  vtkGetMacro(TranslationEnabled,int);
128  vtkBooleanMacro(TranslationEnabled,int);
129  vtkSetMacro(ScalingEnabled,int);
130  vtkGetMacro(ScalingEnabled,int);
131  vtkBooleanMacro(ScalingEnabled,int);
133 
138  void CreateDefaultRepresentation() VTK_OVERRIDE;
139 
140 protected:
142  ~vtkSphereWidget2() VTK_OVERRIDE;
143 
144  // Manage the state of the widget
145  int WidgetState;
146  enum _WidgetState {Start=0,Active};
147 
148  // These methods handle events
149  static void SelectAction(vtkAbstractWidget*);
150  static void EndSelectAction(vtkAbstractWidget*);
151  static void TranslateAction(vtkAbstractWidget*);
152  static void ScaleAction(vtkAbstractWidget*);
153  static void MoveAction(vtkAbstractWidget*);
154 
155  // Control whether scaling and translation are supported
158 
159 private:
160  vtkSphereWidget2(const vtkSphereWidget2&) VTK_DELETE_FUNCTION;
161  void operator=(const vtkSphereWidget2&) VTK_DELETE_FUNCTION;
162 };
163 
164 #endif
3D widget for manipulating a point on a sphere
void PrintSelf(ostream &os, vtkIndent indent) override
Standard macros implementing standard VTK methods.
a general widget for moving handles
void SetRepresentation(vtkSphereRepresentation *r)
Specify an instance of vtkWidgetRepresentation used to represent this widget in the scene...
virtual void CreateDefaultRepresentation()=0
Create the default widget representation if one is not set.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
define the API for widget / widget representation
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
a class defining the representation for the vtkSphereWidget2