VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
37 #ifndef __vtkSphereSource_h
38 #define __vtkSphereSource_h
39 
40 #include "vtkFiltersSourcesModule.h" // For export macro
41 #include "vtkPolyDataAlgorithm.h"
42 
43 #define VTK_MAX_SPHERE_RESOLUTION 1024
44 
45 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm
46 {
47 public:
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
54  static vtkSphereSource *New();
55 
57 
58  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
59  vtkGetMacro(Radius,double);
61 
63 
64  vtkSetVector3Macro(Center,double);
65  vtkGetVectorMacro(Center,double,3);
67 
69 
71  vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
72  vtkGetMacro(ThetaResolution,int);
74 
76 
78  vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
79  vtkGetMacro(PhiResolution,int);
81 
83 
84  vtkSetClampMacro(StartTheta,double,0.0,360.0);
85  vtkGetMacro(StartTheta,double);
87 
89 
90  vtkSetClampMacro(EndTheta,double,0.0,360.0);
91  vtkGetMacro(EndTheta,double);
93 
95 
97  vtkSetClampMacro(StartPhi,double,0.0,360.0);
98  vtkGetMacro(StartPhi,double);
100 
102 
103  vtkSetClampMacro(EndPhi,double,0.0,360.0);
104  vtkGetMacro(EndPhi,double);
106 
108 
114  vtkSetMacro(LatLongTessellation,int);
115  vtkGetMacro(LatLongTessellation,int);
116  vtkBooleanMacro(LatLongTessellation,int);
118 
119 protected:
120  vtkSphereSource(int res=8);
122 
123  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
124  int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
125 
126  double Radius;
127  double Center[3];
130  double StartTheta;
131  double EndTheta;
132  double StartPhi;
133  double EndPhi;
135 
136 private:
137  vtkSphereSource(const vtkSphereSource&); // Not implemented.
138  void operator=(const vtkSphereSource&); // Not implemented.
139 };
140 
141 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
create a polygonal sphere centered at the origin
Superclass for algorithms that produce only polydata as output.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_MAX_SPHERE_RESOLUTION