VTK
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 =========================================================================*/
32 #ifndef vtkSphereSource_h
33 #define vtkSphereSource_h
34 
35 #include "vtkFiltersSourcesModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 #define VTK_MAX_SPHERE_RESOLUTION 1024
39 
40 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
50  static vtkSphereSource *New();
51 
53 
56  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
57  vtkGetMacro(Radius,double);
59 
61 
64  vtkSetVector3Macro(Center,double);
65  vtkGetVectorMacro(Center,double,3);
67 
69 
73  vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
74  vtkGetMacro(ThetaResolution,int);
76 
78 
82  vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
83  vtkGetMacro(PhiResolution,int);
85 
87 
90  vtkSetClampMacro(StartTheta,double,0.0,360.0);
91  vtkGetMacro(StartTheta,double);
93 
95 
98  vtkSetClampMacro(EndTheta,double,0.0,360.0);
99  vtkGetMacro(EndTheta,double);
101 
103 
107  vtkSetClampMacro(StartPhi,double,0.0,360.0);
108  vtkGetMacro(StartPhi,double);
110 
112 
115  vtkSetClampMacro(EndPhi,double,0.0,360.0);
116  vtkGetMacro(EndPhi,double);
118 
120 
128  vtkSetMacro(LatLongTessellation,vtkTypeBool);
129  vtkGetMacro(LatLongTessellation,vtkTypeBool);
130  vtkBooleanMacro(LatLongTessellation,vtkTypeBool);
132 
134 
139  vtkSetMacro(OutputPointsPrecision,int);
140  vtkGetMacro(OutputPointsPrecision,int);
142 
143 protected:
144  vtkSphereSource(int res=8);
145  ~vtkSphereSource() override {}
146 
149 
150  double Radius;
151  double Center[3];
154  double StartTheta;
155  double EndTheta;
156  double StartPhi;
157  double EndPhi;
160 
161 private:
162  vtkSphereSource(const vtkSphereSource&) = delete;
163  void operator=(const vtkSphereSource&) = delete;
164 };
165 
166 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
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.
~vtkSphereSource() override
a simple class to control print indentation
Definition: vtkIndent.h:33
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkTypeBool LatLongTessellation
Store zero or more vtkInformation instances.
#define VTK_MAX_SPHERE_RESOLUTION
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.