VTK  9.3.20240423
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
136#ifndef vtkSphereSource_h
137#define vtkSphereSource_h
138
139#include "vtkFiltersSourcesModule.h" // For export macro
140#include "vtkPolyDataAlgorithm.h"
141
142VTK_ABI_NAMESPACE_BEGIN
143class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
144{
145public:
147
151 void PrintSelf(ostream& os, vtkIndent indent) override;
153
159
161
164 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
165 vtkGetMacro(Radius, double);
167
169
172 vtkSetVector3Macro(Center, double);
173 vtkGetVectorMacro(Center, double, 3);
175
177
181 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
182 vtkGetMacro(ThetaResolution, int);
184
186
190 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
191 vtkGetMacro(PhiResolution, int);
193
195
198 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
199 vtkGetMacro(StartTheta, double);
201
203
206 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
207 vtkGetMacro(EndTheta, double);
209
211
215 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
216 vtkGetMacro(StartPhi, double);
218
220
223 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
224 vtkGetMacro(EndPhi, double);
226
228
236 vtkSetMacro(LatLongTessellation, vtkTypeBool);
237 vtkGetMacro(LatLongTessellation, vtkTypeBool);
238 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
240
242
247 vtkSetMacro(OutputPointsPrecision, int);
248 vtkGetMacro(OutputPointsPrecision, int);
250
252
256 vtkSetMacro(GenerateNormals, vtkTypeBool);
257 vtkGetMacro(GenerateNormals, vtkTypeBool);
258 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
260
261protected:
262 vtkSphereSource(int res = 8);
263 ~vtkSphereSource() override = default;
264
267
268 double Radius;
269 double Center[3];
273 double EndTheta;
274 double StartPhi;
275 double EndPhi;
279
280private:
281 vtkSphereSource(const vtkSphereSource&) = delete;
282 void operator=(const vtkSphereSource&) = delete;
283};
284
285VTK_ABI_NAMESPACE_END
286#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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