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=========================================================================*/
48#ifndef vtkSphereSource_h
49#define vtkSphereSource_h
50
51#include "vtkFiltersSourcesModule.h" // For export macro
53
54class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
55{
56public:
58
62 void PrintSelf(ostream& os, vtkIndent indent) override;
64
70
72
75 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
76 vtkGetMacro(Radius, double);
78
80
83 vtkSetVector3Macro(Center, double);
84 vtkGetVectorMacro(Center, double, 3);
86
88
92 vtkSetClampMacro(ThetaResolution, int, 3, VTK_INT_MAX);
93 vtkGetMacro(ThetaResolution, int);
95
97
101 vtkSetClampMacro(PhiResolution, int, 3, VTK_INT_MAX);
102 vtkGetMacro(PhiResolution, int);
104
106
109 vtkSetClampMacro(StartTheta, double, 0.0, 360.0);
110 vtkGetMacro(StartTheta, double);
112
114
117 vtkSetClampMacro(EndTheta, double, 0.0, 360.0);
118 vtkGetMacro(EndTheta, double);
120
122
126 vtkSetClampMacro(StartPhi, double, 0.0, 360.0);
127 vtkGetMacro(StartPhi, double);
129
131
134 vtkSetClampMacro(EndPhi, double, 0.0, 360.0);
135 vtkGetMacro(EndPhi, double);
137
139
147 vtkSetMacro(LatLongTessellation, vtkTypeBool);
148 vtkGetMacro(LatLongTessellation, vtkTypeBool);
149 vtkBooleanMacro(LatLongTessellation, vtkTypeBool);
151
153
158 vtkSetMacro(OutputPointsPrecision, int);
159 vtkGetMacro(OutputPointsPrecision, int);
161
163
167 vtkSetMacro(GenerateNormals, vtkTypeBool);
168 vtkGetMacro(GenerateNormals, vtkTypeBool);
169 vtkBooleanMacro(GenerateNormals, vtkTypeBool);
171
172protected:
173 vtkSphereSource(int res = 8);
174 ~vtkSphereSource() override = default;
175
178
179 double Radius;
180 double Center[3];
184 double EndTheta;
185 double StartPhi;
186 double EndPhi;
190
191private:
192 vtkSphereSource(const vtkSphereSource&) = delete;
193 void operator=(const vtkSphereSource&) = delete;
194};
195
196#endif
a simple class to control print indentation
Definition vtkIndent.h:49
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