00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00027 #ifndef __vtkSphere_h
00028 #define __vtkSphere_h
00029
00030 #include "vtkImplicitFunction.h"
00031
00032 class VTK_FILTERING_EXPORT vtkSphere : public vtkImplicitFunction
00033 {
00034 public:
00035 vtkTypeRevisionMacro(vtkSphere,vtkImplicitFunction);
00036 void PrintSelf(ostream& os, vtkIndent indent);
00037
00039 static vtkSphere *New();
00040
00042
00043 double EvaluateFunction(double x[3]);
00044 double EvaluateFunction(double x, double y, double z)
00045 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00047
00049 void EvaluateGradient(double x[3], double n[3]);
00050
00052
00053 vtkSetMacro(Radius,double);
00054 vtkGetMacro(Radius,double);
00056
00058
00059 vtkSetVector3Macro(Center,double);
00060 vtkGetVectorMacro(Center,double,3);
00062
00064
00070 static void ComputeBoundingSphere(float *pts, vtkIdType numPts, float sphere[4],
00071 vtkIdType hints[2]);
00072 static void ComputeBoundingSphere(double *pts, vtkIdType numPts, double sphere[4],
00073 vtkIdType hints[2]);
00075
00077
00083 static void ComputeBoundingSphere(float **spheres, vtkIdType numSpheres, float sphere[4],
00084 vtkIdType hints[2]);
00085 static void ComputeBoundingSphere(double **spheres, vtkIdType numSpheres, double sphere[4],
00086 vtkIdType hints[2]);
00088
00089 protected:
00090 vtkSphere();
00091 ~vtkSphere() {};
00092
00093 double Radius;
00094 double Center[3];
00095
00096 private:
00097 vtkSphere(const vtkSphere&);
00098 void operator=(const vtkSphere&);
00099 };
00100
00101 #endif
00102
00103