VTK
vtkSpheres.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkSpheres.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 =========================================================================*/
32 #ifndef vtkSpheres_h
33 #define vtkSpheres_h
34 
35 #include "vtkCommonDataModelModule.h" // For export macro
36 #include "vtkImplicitFunction.h"
37 
38 class vtkSphere;
39 class vtkPoints;
40 class vtkDataArray;
41 
42 class VTKCOMMONDATAMODEL_EXPORT vtkSpheres : public vtkImplicitFunction
43 {
44 public:
46 
49  static vtkSpheres *New();
51  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
60  double EvaluateFunction(double x[3]) override;
62 
67  void EvaluateGradient(double x[3], double n[3]) override;
68 
70 
73  virtual void SetCenters(vtkPoints*);
74  vtkGetObjectMacro(Centers,vtkPoints);
76 
78 
82  void SetRadii(vtkDataArray* radii);
83  vtkGetObjectMacro(Radii,vtkDataArray);
85 
89  int GetNumberOfSpheres();
90 
97  vtkSphere *GetSphere(int i);
98 
104  void GetSphere(int i, vtkSphere *sphere);
105 
106 protected:
107  vtkSpheres();
108  ~vtkSpheres() override;
109 
113 
114 private:
115  vtkSpheres(const vtkSpheres&) = delete;
116  void operator=(const vtkSpheres&) = delete;
117 };
118 
119 #endif
abstract interface for implicit functions
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
implicit function for a set of spheres
Definition: vtkSpheres.h:42
vtkPoints * Centers
Definition: vtkSpheres.h:110
virtual void EvaluateGradient(double x[3], double g[3])=0
Evaluate function gradient at position x-y-z and pass back vector.
vtkSphere * Sphere
Definition: vtkSpheres.h:112
implicit function for a sphere
Definition: vtkSphere.h:37
a simple class to control print indentation
Definition: vtkIndent.h:39
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:54
vtkDataArray * Radii
Definition: vtkSpheres.h:111
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
represent and manipulate 3D points
Definition: vtkPoints.h:39