VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSphere.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00030 #ifndef vtkSphere_h 00031 #define vtkSphere_h 00032 00033 #include "vtkCommonDataModelModule.h" // For export macro 00034 #include "vtkImplicitFunction.h" 00035 00036 class VTKCOMMONDATAMODEL_EXPORT vtkSphere : public vtkImplicitFunction 00037 { 00038 public: 00039 vtkTypeMacro(vtkSphere,vtkImplicitFunction); 00040 void PrintSelf(ostream& os, vtkIndent indent); 00041 00043 static vtkSphere *New(); 00044 00046 00047 double EvaluateFunction(double x[3]); 00048 double EvaluateFunction(double x, double y, double z) 00049 {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ; 00051 00053 void EvaluateGradient(double x[3], double n[3]); 00054 00056 00057 vtkSetMacro(Radius,double); 00058 vtkGetMacro(Radius,double); 00060 00062 00063 vtkSetVector3Macro(Center,double); 00064 vtkGetVectorMacro(Center,double,3); 00066 00068 00074 static void ComputeBoundingSphere(float *pts, vtkIdType numPts, float sphere[4], 00075 vtkIdType hints[2]); 00076 static void ComputeBoundingSphere(double *pts, vtkIdType numPts, double sphere[4], 00077 vtkIdType hints[2]); 00079 00081 00087 static void ComputeBoundingSphere(float **spheres, vtkIdType numSpheres, float sphere[4], 00088 vtkIdType hints[2]); 00089 static void ComputeBoundingSphere(double **spheres, vtkIdType numSpheres, double sphere[4], 00090 vtkIdType hints[2]); 00092 00093 protected: 00094 vtkSphere(); 00095 ~vtkSphere() {} 00096 00097 double Radius; 00098 double Center[3]; 00099 00100 private: 00101 vtkSphere(const vtkSphere&); // Not implemented. 00102 void operator=(const vtkSphere&); // Not implemented. 00103 }; 00104 00105 #endif 00106 00107