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 =========================================================================*/
37 #ifndef __vtkSphereSource_h
38 #define __vtkSphereSource_h
39 
40 #include "vtkPolyDataAlgorithm.h"
41 
42 #define VTK_MAX_SPHERE_RESOLUTION 1024
43 
45 {
46 public:
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
53  static vtkSphereSource *New();
54 
56 
57  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
58  vtkGetMacro(Radius,double);
60 
62 
63  vtkSetVector3Macro(Center,double);
64  vtkGetVectorMacro(Center,double,3);
66 
68 
70  vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
71  vtkGetMacro(ThetaResolution,int);
73 
75 
77  vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
78  vtkGetMacro(PhiResolution,int);
80 
82 
83  vtkSetClampMacro(StartTheta,double,0.0,360.0);
84  vtkGetMacro(StartTheta,double);
86 
88 
89  vtkSetClampMacro(EndTheta,double,0.0,360.0);
90  vtkGetMacro(EndTheta,double);
92 
94 
96  vtkSetClampMacro(StartPhi,double,0.0,360.0);
97  vtkGetMacro(StartPhi,double);
99 
101 
102  vtkSetClampMacro(EndPhi,double,0.0,360.0);
103  vtkGetMacro(EndPhi,double);
105 
107 
113  vtkSetMacro(LatLongTessellation,int);
114  vtkGetMacro(LatLongTessellation,int);
115  vtkBooleanMacro(LatLongTessellation,int);
117 
118 protected:
119  vtkSphereSource(int res=8);
121 
124 
125  double Radius;
126  double Center[3];
129  double StartTheta;
130  double EndTheta;
131  double StartPhi;
132  double EndPhi;
134 
135 private:
136  vtkSphereSource(const vtkSphereSource&); // Not implemented.
137  void operator=(const vtkSphereSource&); // Not implemented.
138 };
139 
140 #endif