VTK
vtkSphere.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSphere.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkSphere_h
31 #define vtkSphere_h
32 
33 #include "vtkCommonDataModelModule.h" // For export macro
34 #include "vtkImplicitFunction.h"
35 
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43  static vtkSphere *New();
44 
46 
47  double EvaluateFunction(double x[3]);
48  double EvaluateFunction(double x, double y, double z)
49  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
51 
53  void EvaluateGradient(double x[3], double n[3]);
54 
56 
57  vtkSetMacro(Radius,double);
58  vtkGetMacro(Radius,double);
60 
62 
63  vtkSetVector3Macro(Center,double);
64  vtkGetVectorMacro(Center,double,3);
66 
68 
74  static void ComputeBoundingSphere(float *pts, vtkIdType numPts, float sphere[4],
75  vtkIdType hints[2]);
76  static void ComputeBoundingSphere(double *pts, vtkIdType numPts, double sphere[4],
77  vtkIdType hints[2]);
79 
81 
87  static void ComputeBoundingSphere(float **spheres, vtkIdType numSpheres, float sphere[4],
88  vtkIdType hints[2]);
89  static void ComputeBoundingSphere(double **spheres, vtkIdType numSpheres, double sphere[4],
90  vtkIdType hints[2]);
92 
93 protected:
94  vtkSphere();
96 
97  double Radius;
98  double Center[3];
99 
100 private:
101  vtkSphere(const vtkSphere&); // Not implemented.
102  void operator=(const vtkSphere&); // Not implemented.
103 };
104 
105 #endif
106 
107 
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
double EvaluateFunction(double x, double y, double z)
Definition: vtkSphere.h:48
int vtkIdType
Definition: vtkType.h:275
virtual void EvaluateGradient(double x[3], double g[3])=0
implicit function for a sphere
Definition: vtkSphere.h:36
a simple class to control print indentation
Definition: vtkIndent.h:38
double Radius
Definition: vtkSphere.h:97
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
#define VTKCOMMONDATAMODEL_EXPORT
~vtkSphere()
Definition: vtkSphere.h:95