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=========================================================================*/
33#ifndef vtkSphereSource_h
34#define vtkSphereSource_h
35
36#include "vtkFiltersSourcesModule.h" // For export macro
38
39class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
40{
41public:
43
47 void PrintSelf(ostream& os, vtkIndent indent) override;
49
55
57
60 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
61 vtkGetMacro(Radius, double);
63
65
68 vtkSetVector3Macro(Center, double);
69 vtkGetVectorMacro(Center, double, 3);
71
73
77 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
78 vtkGetMacro(ThetaResolution, int);
80
82
86 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
87 vtkGetMacro(PhiResolution, int);
89
91
94 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
95 vtkGetMacro(StartTheta, double);
97
99
102 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
103 vtkGetMacro(EndTheta, double);
105
107
111 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
112 vtkGetMacro(StartPhi, double);
114
116
119 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
120 vtkGetMacro(EndPhi, double);
122
124
132 vtkSetMacro(LatLongTessellation, vtkTypeBool);
133 vtkGetMacro(LatLongTessellation, vtkTypeBool);
134 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
136
138
143 vtkSetMacro(OutputPointsPrecision, int);
144 vtkGetMacro(OutputPointsPrecision, int);
146
148
152 vtkSetMacro(GenerateNormals, vtkTypeBool);
153 vtkGetMacro(GenerateNormals, vtkTypeBool);
154 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
156
157protected:
158 vtkSphereSource(int res = 8);
159 ~vtkSphereSource() override = default;
160
163
164 double Radius;
165 double Center[3];
169 double EndTheta;
170 double StartPhi;
171 double EndPhi;
175
176private:
177 vtkSphereSource(const vtkSphereSource&) = delete;
178 void operator=(const vtkSphereSource&) = delete;
179};
180
181#endif
a simple class to control print indentation
Definition vtkIndent.h:34
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