VTK  9.1.0
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
38class vtkSphere;
39class vtkPoints;
40class vtkDataArray;
41
42class VTKCOMMONDATAMODEL_EXPORT vtkSpheres : public vtkImplicitFunction
43{
44public:
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
90
98
104 void GetSphere(int i, vtkSphere* sphere);
105
106protected:
108 ~vtkSpheres() override;
109
113
114private:
115 vtkSpheres(const vtkSpheres&) = delete;
116 void operator=(const vtkSpheres&) = delete;
117};
118
119#endif
abstract superclass for arrays of numeric data
Definition: vtkDataArray.h:159
abstract interface for implicit functions
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:113
represent and manipulate 3D points
Definition: vtkPoints.h:143
implicit function for a sphere
Definition: vtkSphere.h:141
implicit function for a set of spheres
Definition: vtkSpheres.h:43
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:110
virtual void SetCenters(vtkPoints *)
Specify a list of points defining sphere centers.
vtkDataArray * Radii
Definition: vtkSpheres.h:111
static vtkSpheres * New()
Standard methods for instantiation, type information, and printing.
vtkSphere * Sphere
Definition: vtkSpheres.h:112