VTK  9.3.0
vtkSphereSource.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
27#ifndef vtkSphereSource_h
28#define vtkSphereSource_h
29
30#include "vtkFiltersSourcesModule.h" // For export macro
32
33VTK_ABI_NAMESPACE_BEGIN
34class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
35{
36public:
38
42 void PrintSelf(ostream& os, vtkIndent indent) override;
44
50
52
55 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
56 vtkGetMacro(Radius, double);
58
60
63 vtkSetVector3Macro(Center, double);
64 vtkGetVectorMacro(Center, double, 3);
66
68
72 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
73 vtkGetMacro(ThetaResolution, int);
75
77
81 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
82 vtkGetMacro(PhiResolution, int);
84
86
89 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
90 vtkGetMacro(StartTheta, double);
92
94
97 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
98 vtkGetMacro(EndTheta, double);
100
102
106 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
107 vtkGetMacro(StartPhi, double);
109
111
114 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
115 vtkGetMacro(EndPhi, double);
117
119
127 vtkSetMacro(LatLongTessellation, vtkTypeBool);
128 vtkGetMacro(LatLongTessellation, vtkTypeBool);
129 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
131
133
138 vtkSetMacro(OutputPointsPrecision, int);
139 vtkGetMacro(OutputPointsPrecision, int);
141
143
147 vtkSetMacro(GenerateNormals, vtkTypeBool);
148 vtkGetMacro(GenerateNormals, vtkTypeBool);
149 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
151
152protected:
153 vtkSphereSource(int res = 8);
154 ~vtkSphereSource() override = default;
155
158
159 double Radius;
160 double Center[3];
164 double EndTheta;
165 double StartPhi;
166 double EndPhi;
170
171private:
172 vtkSphereSource(const vtkSphereSource&) = delete;
173 void operator=(const vtkSphereSource&) = delete;
174};
175
176VTK_ABI_NAMESPACE_END
177#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only polydata as output.
create a polygonal sphere centered at the origin
vtkSphereSource(int res=8)
~vtkSphereSource() override=default
vtkTypeBool LatLongTessellation
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information, and printing.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkSphereSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both Phi and Theta directions.
vtkTypeBool GenerateNormals
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DOUBLE_MAX
Definition vtkType.h:154
#define VTK_INT_MAX
Definition vtkType.h:144