VTK  9.6.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
26
27#ifndef vtkSphereSource_h
28#define vtkSphereSource_h
29
30#include "vtkFiltersSourcesModule.h" // For export macro
32#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
33
34VTK_ABI_NAMESPACE_BEGIN
35class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkSphereSource : public vtkPolyDataAlgorithm
36{
37public:
39
43 void PrintSelf(ostream& os, vtkIndent indent) override;
45
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
132
134
139 vtkSetMacro(OutputPointsPrecision, int);
140 vtkGetMacro(OutputPointsPrecision, int);
142
144
150 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
152
153protected:
154 vtkSphereSource(int res = 8);
155 ~vtkSphereSource() override = default;
156
159
160 double Radius;
161 double Center[3];
165 double EndTheta;
166 double StartPhi;
167 double EndPhi;
171
172private:
173 vtkSphereSource(const vtkSphereSource&) = delete;
174 void operator=(const vtkSphereSource&) = delete;
175};
176
177VTK_ABI_NAMESPACE_END
178#endif
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
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:207
#define VTK_INT_MAX
Definition vtkType.h:197
#define VTK_MARSHALAUTO