VTK  9.2.6
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 =========================================================================*/
39 #ifndef vtkSphereSource_h
40 #define vtkSphereSource_h
41 
42 #include "vtkFiltersSourcesModule.h" // For export macro
43 #include "vtkPolyDataAlgorithm.h"
44 
45 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
46 {
47 public:
49 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
60  static vtkSphereSource* New();
61 
63 
66  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
67  vtkGetMacro(Radius, double);
69 
71 
74  vtkSetVector3Macro(Center, double);
75  vtkGetVectorMacro(Center, double, 3);
77 
79 
83  vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
84  vtkGetMacro(ThetaResolution, int);
86 
88 
92  vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
93  vtkGetMacro(PhiResolution, int);
95 
97 
100  vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
101  vtkGetMacro(StartTheta, double);
103 
105 
108  vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
109  vtkGetMacro(EndTheta, double);
111 
113 
117  vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
118  vtkGetMacro(StartPhi, double);
120 
122 
125  vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
126  vtkGetMacro(EndPhi, double);
128 
130 
138  vtkSetMacro(LatLongTessellation, vtkTypeBool);
139  vtkGetMacro(LatLongTessellation, vtkTypeBool);
140  vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
142 
144 
149  vtkSetMacro(OutputPointsPrecision, int);
150  vtkGetMacro(OutputPointsPrecision, int);
152 
154 
158  vtkSetMacro(GenerateNormals, vtkTypeBool);
159  vtkGetMacro(GenerateNormals, vtkTypeBool);
160  vtkBooleanMacro(GenerateNormals, vtkTypeBool);
162 
163 protected:
164  vtkSphereSource(int res = 8);
165  ~vtkSphereSource() override = default;
166 
169 
170  double Radius;
171  double Center[3];
174  double StartTheta;
175  double EndTheta;
176  double StartPhi;
177  double EndPhi;
181 
182 private:
183  vtkSphereSource(const vtkSphereSource&) = delete;
184  void operator=(const vtkSphereSource&) = delete;
185 };
186 
187 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
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:155
static vtkPolyDataAlgorithm * New()
int vtkTypeBool
Definition: vtkABI.h:69
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:39
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkTypeBool LatLongTessellation
vtkTypeBool GenerateNormals
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.