VTK: Filters/Sources/vtkSphereSource.h Source File

| 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
36 #ifndef vtkSphereSource_h
37 #define vtkSphereSource_h
38
39 #include "vtkFiltersSourcesModule.h" // For export macro
40 #include "vtkPolyDataAlgorithm.h"
41
42 VTK_ABI_NAMESPACE_BEGIN
43 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
44 {
45 public:
47
50 vtkTypeMacro(vtkSphereSource, vtkPolyDataAlgorithm);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
53
58 static vtkSphereSource* New();
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
161 protected:
162 vtkSphereSource(int res = 8);
163 ~vtkSphereSource() override = default;
164
165 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
166 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
167
168 double Radius;
169 double Center[3];
170 int ThetaResolution;
171 int PhiResolution;
172 double StartTheta;
173 double EndTheta;
174 double StartPhi;
175 double EndPhi;
176 vtkTypeBool LatLongTessellation;
177 int OutputPointsPrecision;
178 vtkTypeBool GenerateNormals;
179
180 private:
181 vtkSphereSource(const vtkSphereSource&) = delete;
182 void operator=(const vtkSphereSource&) = delete;
183 };
184
185 VTK_ABI_NAMESPACE_END
186 #endif
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:43
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:44
vtkSphereSource::New
static vtkSphereSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both Phi and Theta directions.
vtkSphereSource::vtkSphereSource
vtkSphereSource(int res=8)
vtkSphereSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkSphereSource.h:177
vtkSphereSource::Radius
double Radius
Definition: vtkSphereSource.h:168
vtkSphereSource::ThetaResolution
int ThetaResolution
Definition: vtkSphereSource.h:170
vtkSphereSource::~vtkSphereSource
~vtkSphereSource() override=default
vtkSphereSource::StartTheta
double StartTheta
Definition: vtkSphereSource.h:172
vtkSphereSource::PhiResolution
int PhiResolution
Definition: vtkSphereSource.h:171
vtkSphereSource::LatLongTessellation
vtkTypeBool LatLongTessellation
Definition: vtkSphereSource.h:176
vtkSphereSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information, and printing.
vtkSphereSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSphereSource::EndTheta
double EndTheta
Definition: vtkSphereSource.h:173
vtkSphereSource::GenerateNormals
vtkTypeBool GenerateNormals
Definition: vtkSphereSource.h:178
vtkSphereSource::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
vtkSphereSource::StartPhi
double StartPhi
Definition: vtkSphereSource.h:174
vtkSphereSource::EndPhi
double EndPhi
Definition: vtkSphereSource.h:175
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkPolyDataAlgorithm.h
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:154
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:144