62 #ifndef __vtkSphereWidget_h
63 #define __vtkSphereWidget_h
77 #define VTK_SPHERE_OFF 0
78 #define VTK_SPHERE_WIREFRAME 1
79 #define VTK_SPHERE_SURFACE 2
95 {this->Superclass::PlaceWidget();}
96 void PlaceWidget(
double xmin,
double xmax,
double ymin,
double ymax,
97 double zmin,
double zmax)
98 {this->Superclass::PlaceWidget(xmin,xmax,ymin,ymax,zmin,zmax);}
106 vtkGetMacro(Representation,
int);
107 void SetRepresentationToOff()
109 void SetRepresentationToWireframe()
111 void SetRepresentationToSurface()
118 void SetThetaResolution(
int r)
119 { this->SphereSource->SetThetaResolution(r); }
120 int GetThetaResolution()
121 {
return this->SphereSource->GetThetaResolution(); }
127 void SetPhiResolution(
int r)
128 { this->SphereSource->SetPhiResolution(r); }
129 int GetPhiResolution()
130 {
return this->SphereSource->GetPhiResolution(); }
135 void SetRadius(
double r)
141 this->SphereSource->SetRadius(r);
144 {
return this->SphereSource->GetRadius(); }
149 void SetCenter(
double x,
double y,
double z)
151 this->SphereSource->SetCenter(x,y,z);
153 void SetCenter(
double x[3])
155 this->SetCenter(x[0], x[1], x[2]);
158 {
return this->SphereSource->GetCenter();}
159 void GetCenter(
double xyz[3])
160 {this->SphereSource->GetCenter(xyz);}
166 vtkSetMacro(Translation,
int);
167 vtkGetMacro(Translation,
int);
168 vtkBooleanMacro(Translation,
int);
169 vtkSetMacro(Scale,
int);
170 vtkGetMacro(Scale,
int);
171 vtkBooleanMacro(Scale,
int);
179 vtkSetMacro(HandleVisibility,
int);
180 vtkGetMacro(HandleVisibility,
int);
181 vtkBooleanMacro(HandleVisibility,
int);
188 vtkSetVector3Macro(HandleDirection,
double);
189 vtkGetVector3Macro(HandleDirection,
double);
194 vtkGetVector3Macro(HandlePosition,
double);
215 vtkGetObjectMacro(SelectedSphereProperty,
vtkProperty);
223 vtkGetObjectMacro(SelectedHandleProperty,
vtkProperty);
249 void OnLeftButtonDown();
250 void OnLeftButtonUp();
251 void OnRightButtonDown();
252 void OnRightButtonUp();
259 void HighlightSphere(
int highlight);
260 void SelectRepresentation();
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);
282 void CreateDefaultProperties();
288 void HighlightHandle(
int);
290 double HandleDirection[3];
291 double HandlePosition[3];