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
36#ifndef vtkSphereSource_h
37#define vtkSphereSource_h
38
39#include "vtkFiltersSourcesModule.h" // For export macro
41
42VTK_ABI_NAMESPACE_BEGIN
43class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
44{
45public:
47
51 void PrintSelf(ostream& os, vtkIndent indent) override;
53
59
61
64 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
65 vtkGetMacro(Radius, double);
67
69
72 vtkSetVector3Macro(Center, double);
73 vtkGetVectorMacro(Center, double, 3);
75
77
81 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
82 vtkGetMacro(ThetaResolution, int);
84
86
90 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
91 vtkGetMacro(PhiResolution, int);
93
95
98 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
99 vtkGetMacro(StartTheta, double);
101
103
106 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
107 vtkGetMacro(EndTheta, double);
109
111
115 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
116 vtkGetMacro(StartPhi, double);
118
120
123 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
124 vtkGetMacro(EndPhi, double);
126
128
136 vtkSetMacro(LatLongTessellation, vtkTypeBool);
137 vtkGetMacro(LatLongTessellation, vtkTypeBool);
138 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
140
142
147 vtkSetMacro(OutputPointsPrecision, int);
148 vtkGetMacro(OutputPointsPrecision, int);
150
152
156 vtkSetMacro(GenerateNormals, vtkTypeBool);
157 vtkGetMacro(GenerateNormals, vtkTypeBool);
158 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
160
161protected:
162 vtkSphereSource(int res = 8);
163 ~vtkSphereSource() override = default;
164
167
168 double Radius;
169 double Center[3];
173 double EndTheta;
174 double StartPhi;
175 double EndPhi;
179
180private:
181 vtkSphereSource(const vtkSphereSource&) = delete;
182 void operator=(const vtkSphereSource&) = delete;
183};
184
185VTK_ABI_NAMESPACE_END
186#endif
a simple class to control print indentation
Definition vtkIndent.h:38
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