Thanks to visit codestin.com
Credit goes to vtk.org

VTK  9.5.20250921
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#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
142
143VTK_ABI_NAMESPACE_BEGIN
144class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkSphereSource : public vtkPolyDataAlgorithm
145{
146public:
148
152 void PrintSelf(ostream& os, vtkIndent indent) override;
154
160
162
165 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
166 vtkGetMacro(Radius, double);
168
170
173 vtkSetVector3Macro(Center, double);
174 vtkGetVectorMacro(Center, double, 3);
176
178
182 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
183 vtkGetMacro(ThetaResolution, int);
185
187
191 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
192 vtkGetMacro(PhiResolution, int);
194
196
199 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
200 vtkGetMacro(StartTheta, double);
202
204
207 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
208 vtkGetMacro(EndTheta, double);
210
212
216 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
217 vtkGetMacro(StartPhi, double);
219
221
224 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
225 vtkGetMacro(EndPhi, double);
227
229
237 vtkSetMacro(LatLongTessellation, vtkTypeBool);
238 vtkGetMacro(LatLongTessellation, vtkTypeBool);
239 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
241
243
248 vtkSetMacro(OutputPointsPrecision, int);
249 vtkGetMacro(OutputPointsPrecision, int);
251
253
257 vtkSetMacro(GenerateNormals, vtkTypeBool);
258 vtkGetMacro(GenerateNormals, vtkTypeBool);
259 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
261
262protected:
263 vtkSphereSource(int res = 8);
264 ~vtkSphereSource() override = default;
265
268
269 double Radius;
270 double Center[3];
274 double EndTheta;
275 double StartPhi;
276 double EndPhi;
280
281private:
282 vtkSphereSource(const vtkSphereSource&) = delete;
283 void operator=(const vtkSphereSource&) = delete;
284};
285
286VTK_ABI_NAMESPACE_END
287#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:172
#define VTK_INT_MAX
Definition vtkType.h:162
#define VTK_MARSHALAUTO