00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00060 #ifndef __vtkSphereSource_h
00061 #define __vtkSphereSource_h
00062
00063 #include "vtkPolyDataSource.h"
00064
00065 #define VTK_MAX_SPHERE_RESOLUTION 1024
00066
00067 class VTK_EXPORT vtkSphereSource : public vtkPolyDataSource
00068 {
00069 public:
00070 vtkTypeMacro(vtkSphereSource,vtkPolyDataSource);
00071 void PrintSelf(ostream& os, vtkIndent indent);
00072
00076 static vtkSphereSource *New();
00077
00079 vtkSetClampMacro(Radius,float,0.0,VTK_LARGE_FLOAT);
00080 vtkGetMacro(Radius,float);
00081
00083 vtkSetVector3Macro(Center,float);
00084 vtkGetVectorMacro(Center,float,3);
00085
00088 vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00089 vtkGetMacro(ThetaResolution,int);
00090
00093 vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00094 vtkGetMacro(PhiResolution,int);
00095
00097 vtkSetClampMacro(StartTheta,float,0.0,360.0);
00098 vtkGetMacro(StartTheta,float);
00099
00101 vtkSetClampMacro(EndTheta,float,0.0,360.0);
00102 vtkGetMacro(EndTheta,float);
00103
00106 vtkSetClampMacro(StartPhi,float,0.0,360.0);
00107 vtkGetMacro(StartPhi,float);
00108
00110 vtkSetClampMacro(EndPhi,float,0.0,360.0);
00111 vtkGetMacro(EndPhi,float);
00112
00113 protected:
00114 vtkSphereSource(int res=8);
00115 ~vtkSphereSource() {};
00116 vtkSphereSource(const vtkSphereSource&) {};
00117 void operator=(const vtkSphereSource&) {};
00118
00119 void Execute();
00120 void ExecuteInformation();
00121
00122 float Radius;
00123 float Center[3];
00124 int ThetaResolution;
00125 int PhiResolution;
00126 float StartTheta;
00127 float EndTheta;
00128 float StartPhi;
00129 float EndPhi;
00130 };
00131
00132 #endif
00133
00134