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 =========================================================================*/
38 #ifndef vtkSphereSource_h
39 #define vtkSphereSource_h
40 
41 #include "vtkFiltersSourcesModule.h" // For export macro
42 #include "vtkPolyDataAlgorithm.h"
43 
44 #define VTK_MAX_SPHERE_RESOLUTION 1024
45 
46 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
56  static vtkSphereSource *New();
57 
59 
62  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
63  vtkGetMacro(Radius,double);
65 
67 
70  vtkSetVector3Macro(Center,double);
71  vtkGetVectorMacro(Center,double,3);
73 
75 
79  vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
80  vtkGetMacro(ThetaResolution,int);
82 
84 
88  vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
89  vtkGetMacro(PhiResolution,int);
91 
93 
96  vtkSetClampMacro(StartTheta,double,0.0,360.0);
97  vtkGetMacro(StartTheta,double);
99 
101 
104  vtkSetClampMacro(EndTheta,double,0.0,360.0);
105  vtkGetMacro(EndTheta,double);
107 
109 
113  vtkSetClampMacro(StartPhi,double,0.0,360.0);
114  vtkGetMacro(StartPhi,double);
116 
118 
121  vtkSetClampMacro(EndPhi,double,0.0,360.0);
122  vtkGetMacro(EndPhi,double);
124 
126 
134  vtkSetMacro(LatLongTessellation,vtkTypeBool);
135  vtkGetMacro(LatLongTessellation,vtkTypeBool);
136  vtkBooleanMacro(LatLongTessellation,vtkTypeBool);
138 
140 
145  vtkSetMacro(OutputPointsPrecision,int);
146  vtkGetMacro(OutputPointsPrecision,int);
148 
149 protected:
150  vtkSphereSource(int res=8);
151  ~vtkSphereSource() override {}
152 
155 
156  double Radius;
157  double Center[3];
160  double StartTheta;
161  double EndTheta;
162  double StartPhi;
163  double EndPhi;
166 
167 private:
168  vtkSphereSource(const vtkSphereSource&) = delete;
169  void operator=(const vtkSphereSource&) = delete;
170 };
171 
172 #endif
#define VTK_DOUBLE_MAX
Definition: vtkType.h:171
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:39
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.