58 #ifndef __vtkSphereWidget_h
59 #define __vtkSphereWidget_h
61 #include "vtkInteractionWidgetsModule.h"
66 class vtkPolyDataMapper;
74 #define VTK_SPHERE_OFF 0
75 #define VTK_SPHERE_WIREFRAME 1
76 #define VTK_SPHERE_SURFACE 2
85 void PrintSelf(ostream& os, vtkIndent indent);
89 virtual void SetEnabled(
int);
92 {this->Superclass::PlaceWidget();}
93 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
94 double zmin,
double zmax)
95 {this->Superclass::PlaceWidget(xmin,xmax,ymin,ymax,zmin,zmax);}
103 vtkGetMacro(Representation,
int);
116 { this->SphereSource->SetThetaResolution(r); }
118 {
return this->SphereSource->GetThetaResolution(); }
125 { this->SphereSource->SetPhiResolution(r); }
127 {
return this->SphereSource->GetPhiResolution(); }
138 this->SphereSource->SetRadius(r);
141 {
return this->SphereSource->GetRadius(); }
148 this->SphereSource->SetCenter(x,y,z);
152 this->SetCenter(x[0], x[1], x[2]);
155 {
return this->SphereSource->GetCenter();}
157 {this->SphereSource->GetCenter(xyz);}
163 vtkSetMacro(Translation,
int);
164 vtkGetMacro(Translation,
int);
165 vtkBooleanMacro(Translation,
int);
166 vtkSetMacro(Scale,
int);
167 vtkGetMacro(Scale,
int);
168 vtkBooleanMacro(Scale,
int);
176 vtkSetMacro(HandleVisibility,
int);
177 vtkGetMacro(HandleVisibility,
int);
178 vtkBooleanMacro(HandleVisibility,
int);
185 vtkSetVector3Macro(HandleDirection,
double);
186 vtkGetVector3Macro(HandleDirection,
double);
191 vtkGetVector3Macro(HandlePosition,
double);
206 void GetSphere(vtkSphere *sphere);
211 vtkGetObjectMacro(SphereProperty,vtkProperty);
212 vtkGetObjectMacro(SelectedSphereProperty,vtkProperty);
219 vtkGetObjectMacro(HandleProperty,vtkProperty);
220 vtkGetObjectMacro(SelectedHandleProperty,vtkProperty);
240 static void ProcessEvents(vtkObject*
object,
246 void OnLeftButtonDown();
247 void OnLeftButtonUp();
248 void OnRightButtonDown();
249 void OnRightButtonUp();
256 void HighlightSphere(
int highlight);
257 void SelectRepresentation();
266 virtual void RegisterPickers();
271 void Translate(
double *p1,
double *p2);
272 void ScaleSphere(
double *p1,
double *p2,
int X,
int Y);
273 void MoveHandle(
double *p1,
double *p2,
int X,
int Y);
274 void PlaceHandle(
double *center,
double radius);
282 void CreateDefaultProperties();
288 void HighlightHandle(
int);
290 double HandleDirection[3];
291 double HandlePosition[3];
concrete dataset represents vertices, lines, polygons, and triangle strips
create a polygonal sphere centered at the origin