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 "vtkImplicitFunction.h"
34 
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent);
40 
42  static vtkSphere *New();
43 
45 
46  double EvaluateFunction(double x[3]);
47  double EvaluateFunction(double x, double y, double z)
48  {return this->vtkImplicitFunction::EvaluateFunction(x, y, z); } ;
50 
52  void EvaluateGradient(double x[3], double n[3]);
53 
55 
56  vtkSetMacro(Radius,double);
57  vtkGetMacro(Radius,double);
59 
61 
62  vtkSetVector3Macro(Center,double);
63  vtkGetVectorMacro(Center,double,3);
65 
67 
73  static void ComputeBoundingSphere(float *pts, vtkIdType numPts, float sphere[4],
74  vtkIdType hints[2]);
75  static void ComputeBoundingSphere(double *pts, vtkIdType numPts, double sphere[4],
76  vtkIdType hints[2]);
78 
80 
86  static void ComputeBoundingSphere(float **spheres, vtkIdType numSpheres, float sphere[4],
87  vtkIdType hints[2]);
88  static void ComputeBoundingSphere(double **spheres, vtkIdType numSpheres, double sphere[4],
89  vtkIdType hints[2]);
91 
92 protected:
93  vtkSphere();
94  ~vtkSphere() {};
95 
96  double Radius;
97  double Center[3];
98 
99 private:
100  vtkSphere(const vtkSphere&); // Not implemented.
101  void operator=(const vtkSphere&); // Not implemented.
102 };
103 
104 #endif
105 
106 
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
double EvaluateFunction(double x, double y, double z)
Definition: vtkSphere.h:47
#define VTK_FILTERING_EXPORT
int vtkIdType
Definition: vtkType.h:255
virtual void EvaluateGradient(double x[3], double g[3])=0
implicit function for a sphere
Definition: vtkSphere.h:35
a simple class to control print indentation
Definition: vtkIndent.h:37
void PrintSelf(ostream &os, vtkIndent indent)
static vtkObject * New()
~vtkSphere()
Definition: vtkSphere.h:94