VTK  9.1.0
vtkSphereSource.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSphereSource.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
142#ifndef vtkSphereSource_h
143#define vtkSphereSource_h
144
145#include "vtkFiltersSourcesModule.h" // For export macro
146#include "vtkPolyDataAlgorithm.h"
147
148class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
149{
150public:
152
156 void PrintSelf(ostream& os, vtkIndent indent) override;
158
164
166
169 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
170 vtkGetMacro(Radius, double);
172
174
177 vtkSetVector3Macro(Center, double);
178 vtkGetVectorMacro(Center, double, 3);
180
182
186 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
187 vtkGetMacro(ThetaResolution, int);
189
191
195 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
196 vtkGetMacro(PhiResolution, int);
198
200
203 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
204 vtkGetMacro(StartTheta, double);
206
208
211 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
212 vtkGetMacro(EndTheta, double);
214
216
220 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
221 vtkGetMacro(StartPhi, double);
223
225
228 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
229 vtkGetMacro(EndPhi, double);
231
233
241 vtkSetMacro(LatLongTessellation, vtkTypeBool);
242 vtkGetMacro(LatLongTessellation, vtkTypeBool);
243 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
245
247
252 vtkSetMacro(OutputPointsPrecision, int);
253 vtkGetMacro(OutputPointsPrecision, int);
255
257
261 vtkSetMacro(GenerateNormals, vtkTypeBool);
262 vtkGetMacro(GenerateNormals, vtkTypeBool);
263 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
265
266protected:
267 vtkSphereSource(int res = 8);
268 ~vtkSphereSource() override = default;
269
272
273 double Radius;
274 double Center[3];
278 double EndTheta;
279 double StartPhi;
280 double EndPhi;
284
285private:
286 vtkSphereSource(const vtkSphereSource&) = delete;
287 void operator=(const vtkSphereSource&) = delete;
288};
289
290#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
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:69
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
#define VTK_INT_MAX
Definition: vtkType.h:155