VTK  9.7.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 #include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33 
34 VTK_ABI_NAMESPACE_BEGIN
35 class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkSphereSource : public vtkPolyDataAlgorithm
36 {
37 public:
39 
43  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
50  static vtkSphereSource* New();
51 
53 
56  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
57  vtkGetMacro(Radius, double);
59 
61 
64  vtkSetVector3Macro(Center, double);
65  vtkGetVectorMacro(Center, double, 3);
67 
69 
73  vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
74  vtkGetMacro(ThetaResolution, int);
76 
78 
82  vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
83  vtkGetMacro(PhiResolution, int);
85 
87 
90  vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
91  vtkGetMacro(StartTheta, double);
93 
95 
98  vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
99  vtkGetMacro(EndTheta, double);
101 
103 
107  vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
108  vtkGetMacro(StartPhi, double);
110 
112 
115  vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
116  vtkGetMacro(EndPhi, double);
118 
120 
128  vtkSetMacro(LatLongTessellation, vtkTypeBool);
129  vtkGetMacro(LatLongTessellation, vtkTypeBool);
130  vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
132 
134 
139  vtkSetMacro(OutputPointsPrecision, int);
140  vtkGetMacro(OutputPointsPrecision, int);
142 
144 
148  vtkSetMacro(GenerateNormals, vtkTypeBool);
149  vtkGetMacro(GenerateNormals, vtkTypeBool);
150  vtkBooleanMacro(GenerateNormals, vtkTypeBool);
152 
153 protected:
154  vtkSphereSource(int res = 8);
155  ~vtkSphereSource() override = default;
156 
159 
160  double Radius;
161  double Center[3];
164  double StartTheta;
165  double EndTheta;
166  double StartPhi;
167  double EndPhi;
171 
172 private:
173  vtkSphereSource(const vtkSphereSource&) = delete;
174  void operator=(const vtkSphereSource&) = delete;
175 };
176 
177 VTK_ABI_NAMESPACE_END
178 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:202
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:192
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.
#define VTK_MARSHALAUTO
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.