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 =========================================================================*/
92 #ifndef vtkSphereWidget2_h
93 #define vtkSphereWidget2_h
94 
95 #include "vtkInteractionWidgetsModule.h" // For export macro
96 #include "vtkAbstractWidget.h"
97 
99 class vtkHandleWidget;
100 
101 
103 {
104 public:
106  static vtkSphereWidget2 *New();
107 
109 
111  void PrintSelf(ostream& os, vtkIndent indent);
113 
115 
119  {this->Superclass::SetWidgetRepresentation(reinterpret_cast<vtkWidgetRepresentation*>(r));}
121 
123 
125  vtkSetMacro(TranslationEnabled,int);
126  vtkGetMacro(TranslationEnabled,int);
127  vtkBooleanMacro(TranslationEnabled,int);
128  vtkSetMacro(ScalingEnabled,int);
129  vtkGetMacro(ScalingEnabled,int);
130  vtkBooleanMacro(ScalingEnabled,int);
132 
136 
137 protected:
139  ~vtkSphereWidget2();
140 
141 //BTX - manage the state of the widget
143  enum _WidgetState {Start=0,Active};
144 //ETX
145 
146  // These methods handle events
147  static void SelectAction(vtkAbstractWidget*);
148  static void EndSelectAction(vtkAbstractWidget*);
149  static void TranslateAction(vtkAbstractWidget*);
150  static void ScaleAction(vtkAbstractWidget*);
151  static void MoveAction(vtkAbstractWidget*);
152 
153  // Control whether scaling and translation are supported
156 
157 private:
158  vtkSphereWidget2(const vtkSphereWidget2&); //Not implemented
159  void operator=(const vtkSphereWidget2&); //Not implemented
160 };
161 
162 #endif
3D widget for manipulating a point on a sphere
void PrintSelf(ostream &os, vtkIndent indent)
a general widget for moving handles
void SetRepresentation(vtkSphereRepresentation *r)
virtual void CreateDefaultRepresentation()=0
#define VTKINTERACTIONWIDGETS_EXPORT
a simple class to control print indentation
Definition: vtkIndent.h:38
define the API for widget / widget representation
static vtkObject * New()
a class defining the representation for the vtkSphereWidget2