VTK  9.7.20260712
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
22
23#ifndef vtkSpheres_h
24#define vtkSpheres_h
25
26#include "vtkCommonDataModelModule.h" // For export macro
27#include "vtkImplicitFunction.h"
28
29VTK_ABI_NAMESPACE_BEGIN
30class vtkSphere;
31class vtkPoints;
32class vtkDataArray;
33
34class VTKCOMMONDATAMODEL_EXPORT vtkSpheres : public vtkImplicitFunction
35{
36public:
38
41 static vtkSpheres* New();
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
52 double EvaluateFunction(double x[3]) override;
54
59 void EvaluateGradient(double x[3], double n[3]) override;
60
62
65 virtual void SetCenters(vtkPoints*);
66 vtkGetObjectMacro(Centers, vtkPoints);
68
70
74 void SetRadii(vtkDataArray* radii);
75 vtkGetObjectMacro(Radii, vtkDataArray);
77
82
90
96 void GetSphere(int i, vtkSphere* sphere);
97
98protected:
100 ~vtkSpheres() override;
101
105
106private:
107 vtkSpheres(const vtkSpheres&) = delete;
108 void operator=(const vtkSpheres&) = delete;
109};
110
111VTK_ABI_NAMESPACE_END
112#endif
virtual double EvaluateFunction(double x[3])=0
Evaluate function at position x-y-z and return value.
a simple class to control print indentation
Definition vtkIndent.h:108
represent and manipulate 3D points
Definition vtkPoints.h:140
implicit function for a sphere
Definition vtkSphere.h:133
void SetRadii(vtkDataArray *radii)
Specify a list of radii for the spheres.
~vtkSpheres() override
double EvaluateFunction(double x[3]) override
Evaluate spheres equations.
vtkSphere * GetSphere(int i)
Create and return a pointer to a vtkSphere object at the ith position.
int GetNumberOfSpheres()
Return the number of spheres in the set of spheres.
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void EvaluateGradient(double x[3], double n[3]) override
Evaluate spheres gradient.
void GetSphere(int i, vtkSphere *sphere)
If i is within the allowable range, mutates the given sphere's Center and Radius to match the vtkSphe...
vtkPoints * Centers
Definition vtkSpheres.h:102
virtual void SetCenters(vtkPoints *)
Specify a list of points defining sphere centers.
vtkDataArray * Radii
Definition vtkSpheres.h:103
static vtkSpheres * New()
Standard methods for instantiation, type information, and printing.
vtkSphere * Sphere
Definition vtkSpheres.h:104
#define vtkDataArray