VTK  9.3.1
vtkSpheres.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
20 #ifndef vtkSpheres_h
21 #define vtkSpheres_h
22 
23 #include "vtkCommonDataModelModule.h" // For export macro
24 #include "vtkImplicitFunction.h"
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkSphere;
28 class vtkPoints;
29 class vtkDataArray;
30 
31 class VTKCOMMONDATAMODEL_EXPORT vtkSpheres : public vtkImplicitFunction
32 {
33 public:
35 
38  static vtkSpheres* New();
40  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
49  double EvaluateFunction(double x[3]) override;
51 
56  void EvaluateGradient(double x[3], double n[3]) override;
57 
59 
62  virtual void SetCenters(vtkPoints*);
63  vtkGetObjectMacro(Centers, vtkPoints);
65 
67 
71  void SetRadii(vtkDataArray* radii);
72  vtkGetObjectMacro(Radii, vtkDataArray);
74 
78  int GetNumberOfSpheres();
79 
86  vtkSphere* GetSphere(int i);
87 
93  void GetSphere(int i, vtkSphere* sphere);
94 
95 protected:
96  vtkSpheres();
97  ~vtkSpheres() override;
98 
102 
103 private:
104  vtkSpheres(const vtkSpheres&) = delete;
105  void operator=(const vtkSpheres&) = delete;
106 };
107 
108 VTK_ABI_NAMESPACE_END
109 #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:31
vtkPoints * Centers
Definition: vtkSpheres.h:99
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:101
implicit function for a sphere
Definition: vtkSphere.h:23
a simple class to control print indentation
Definition: vtkIndent.h:28
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:44
vtkDataArray * Radii
Definition: vtkSpheres.h:100
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:28