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=========================================================================*/
42#ifndef vtkSphereSource_h
43#define vtkSphereSource_h
44
45#include "vtkFiltersSourcesModule.h" // For export macro
47
48class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
49{
50public:
52
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
64
66
69 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
70 vtkGetMacro(Radius, double);
72
74
77 vtkSetVector3Macro(Center, double);
78 vtkGetVectorMacro(Center, double, 3);
80
82
86 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
87 vtkGetMacro(ThetaResolution, int);
89
91
95 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
96 vtkGetMacro(PhiResolution, int);
98
100
103 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
104 vtkGetMacro(StartTheta, double);
106
108
111 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
112 vtkGetMacro(EndTheta, double);
114
116
120 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
121 vtkGetMacro(StartPhi, double);
123
125
128 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
129 vtkGetMacro(EndPhi, double);
131
133
141 vtkSetMacro(LatLongTessellation, vtkTypeBool);
142 vtkGetMacro(LatLongTessellation, vtkTypeBool);
143 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
145
147
152 vtkSetMacro(OutputPointsPrecision, int);
153 vtkGetMacro(OutputPointsPrecision, int);
155
157
161 vtkSetMacro(GenerateNormals, vtkTypeBool);
162 vtkGetMacro(GenerateNormals, vtkTypeBool);
163 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
165
166protected:
167 vtkSphereSource(int res = 8);
168 ~vtkSphereSource() override = default;
169
172
173 double Radius;
174 double Center[3];
178 double EndTheta;
179 double StartPhi;
180 double EndPhi;
184
185private:
186 vtkSphereSource(const vtkSphereSource&) = delete;
187 void operator=(const vtkSphereSource&) = delete;
188};
189
190#endif
a simple class to control print indentation
Definition: vtkIndent.h:43
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