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 
148 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
149 {
150 public:
152 
156  void PrintSelf(ostream& os, vtkIndent indent) override;
158 
163  static vtkSphereSource* New();
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 
266 protected:
267  vtkSphereSource(int res = 8);
268  ~vtkSphereSource() override = default;
269 
272 
273  double Radius;
274  double Center[3];
277  double StartTheta;
278  double EndTheta;
279  double StartPhi;
280  double EndPhi;
284 
285 private:
286  vtkSphereSource(const vtkSphereSource&) = delete;
287  void operator=(const vtkSphereSource&) = delete;
288 };
289 
290 #endif
VTK_INT_MAX
#define VTK_INT_MAX
Definition: vtkType.h:155
vtkSphereSource::New
static vtkSphereSource * New()
Construct sphere with radius=0.5 and default resolution 8 in both Phi and Theta directions.
vtkSphereSource::~vtkSphereSource
~vtkSphereSource() override=default
vtkSphereSource::EndTheta
double EndTheta
Definition: vtkSphereSource.h:278
vtkSphereSource::PhiResolution
int PhiResolution
Definition: vtkSphereSource.h:276
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:145
vtkSphereSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for obtaining type information, and printing.
vtkSphereSource::StartTheta
double StartTheta
Definition: vtkSphereSource.h:277
vtkSphereSource::Radius
double Radius
Definition: vtkSphereSource.h:273
vtkSphereSource::LatLongTessellation
vtkTypeBool LatLongTessellation
Definition: vtkSphereSource.h:281
vtkPolyDataAlgorithm.h
vtkSphereSource::vtkSphereSource
vtkSphereSource(int res=8)
vtkSphereSource::StartPhi
double StartPhi
Definition: vtkSphereSource.h:279
vtkSphereSource
create a polygonal sphere centered at the origin
Definition: vtkSphereSource.h:149
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkSphereSource::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSphereSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkSphereSource.h:282
vtkSphereSource::GenerateNormals
vtkTypeBool GenerateNormals
Definition: vtkSphereSource.h:283
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:183
vtkSphereSource::ThetaResolution
int ThetaResolution
Definition: vtkSphereSource.h:275
vtkSphereSource::EndPhi
double EndPhi
Definition: vtkSphereSource.h:280
vtkSphereSource::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:151