VTK  9.3.1
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
31 #include "vtkPolyDataAlgorithm.h"
32 
33 VTK_ABI_NAMESPACE_BEGIN
34 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
35 {
36 public:
38 
42  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
49  static vtkSphereSource* New();
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 
152 protected:
153  vtkSphereSource(int res = 8);
154  ~vtkSphereSource() override = default;
155 
158 
159  double Radius;
160  double Center[3];
163  double StartTheta;
164  double EndTheta;
165  double StartPhi;
166  double EndPhi;
170 
171 private:
172  vtkSphereSource(const vtkSphereSource&) = delete;
173  void operator=(const vtkSphereSource&) = delete;
174 };
175 
176 VTK_ABI_NAMESPACE_END
177 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:144
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:64
create a polygonal sphere centered at the origin
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkTypeBool LatLongTessellation
vtkTypeBool GenerateNormals
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.