Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkSphereSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSphereSource.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00050 #ifndef __vtkSphereSource_h
00051 #define __vtkSphereSource_h
00052 
00053 #include "vtkPolyDataSource.h"
00054 
00055 #define VTK_MAX_SPHERE_RESOLUTION 1024
00056 
00057 class VTK_GRAPHICS_EXPORT vtkSphereSource : public vtkPolyDataSource 
00058 {
00059 public:
00060   vtkTypeRevisionMacro(vtkSphereSource,vtkPolyDataSource);
00061   void PrintSelf(ostream& os, vtkIndent indent);
00062 
00066   static vtkSphereSource *New();
00067 
00069 
00070   vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
00071   vtkGetMacro(Radius,double);
00073 
00075 
00076   vtkSetVector3Macro(Center,double);
00077   vtkGetVectorMacro(Center,double,3);
00079 
00081 
00083   vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00084   vtkGetMacro(ThetaResolution,int);
00086 
00088 
00090   vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00091   vtkGetMacro(PhiResolution,int);
00093 
00095 
00096   vtkSetClampMacro(StartTheta,double,0.0,360.0);
00097   vtkGetMacro(StartTheta,double);
00099 
00101 
00102   vtkSetClampMacro(EndTheta,double,0.0,360.0);
00103   vtkGetMacro(EndTheta,double);
00105 
00107 
00109   vtkSetClampMacro(StartPhi,double,0.0,360.0);
00110   vtkGetMacro(StartPhi,double);
00112 
00114 
00115   vtkSetClampMacro(EndPhi,double,0.0,360.0);
00116   vtkGetMacro(EndPhi,double);
00118 
00120 
00126   vtkSetMacro(LatLongTessellation,int);
00127   vtkGetMacro(LatLongTessellation,int);
00128   vtkBooleanMacro(LatLongTessellation,int);
00130 
00131 protected:
00132   vtkSphereSource(int res=8);
00133   ~vtkSphereSource() {}
00134 
00135   void Execute();
00136   void ExecuteInformation();
00137   
00138   double Radius;
00139   double Center[3];
00140   int ThetaResolution;
00141   int PhiResolution;
00142   double StartTheta;
00143   double EndTheta;
00144   double StartPhi;
00145   double EndPhi;
00146   int LatLongTessellation;
00147   
00148 private:
00149   vtkSphereSource(const vtkSphereSource&);  // Not implemented.
00150   void operator=(const vtkSphereSource&);  // Not implemented.
00151 };
00152 
00153 #endif
00154 
00155