00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00030 #ifndef __vtkSphere_h
00031 #define __vtkSphere_h
00032
00033 #include "vtkImplicitFunction.h"
00034
00035 class VTK_FILTERING_EXPORT vtkSphere : public vtkImplicitFunction
00036 {
00037 public:
00038 vtkTypeMacro(vtkSphere,vtkImplicitFunction);
00039 void PrintSelf(ostream& os, vtkIndent indent);
00040
00042 static vtkSphere *New();
00043
00045
00046 double EvaluateFunction(double x[3]);
00047 double EvaluateFunction(double x, double y, double z)
00048 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
00050
00052 void EvaluateGradient(double x[3], double n[3]);
00053
00055
00056 vtkSetMacro(Radius,double);
00057 vtkGetMacro(Radius,double);
00059
00061
00062 vtkSetVector3Macro(Center,double);
00063 vtkGetVectorMacro(Center,double,3);
00065
00067
00073 static void ComputeBoundingSphere(float *pts, vtkIdType numPts, float sphere[4],
00074 vtkIdType hints[2]);
00075 static void ComputeBoundingSphere(double *pts, vtkIdType numPts, double sphere[4],
00076 vtkIdType hints[2]);
00078
00080
00086 static void ComputeBoundingSphere(float **spheres, vtkIdType numSpheres, float sphere[4],
00087 vtkIdType hints[2]);
00088 static void ComputeBoundingSphere(double **spheres, vtkIdType numSpheres, double sphere[4],
00089 vtkIdType hints[2]);
00091
00092 protected:
00093 vtkSphere();
00094 ~vtkSphere() {};
00095
00096 double Radius;
00097 double Center[3];
00098
00099 private:
00100 vtkSphere(const vtkSphere&);
00101 void operator=(const vtkSphere&);
00102 };
00103
00104 #endif
00105
00106