Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Graphics/vtkSphereSource.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkSphereSource.h,v $
00005   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00054 #ifndef __vtkSphereSource_h
00055 #define __vtkSphereSource_h
00056 
00057 #include "vtkPolyDataSource.h"
00058 
00059 #define VTK_MAX_SPHERE_RESOLUTION 1024
00060 
00061 class VTK_GRAPHICS_EXPORT vtkSphereSource : public vtkPolyDataSource 
00062 {
00063 public:
00064   vtkTypeRevisionMacro(vtkSphereSource,vtkPolyDataSource);
00065   void PrintSelf(ostream& os, vtkIndent indent);
00066 
00070   static vtkSphereSource *New();
00071 
00073 
00074   vtkSetClampMacro(Radius,float,0.0,VTK_LARGE_FLOAT);
00075   vtkGetMacro(Radius,float);
00077 
00079 
00080   vtkSetVector3Macro(Center,float);
00081   vtkGetVectorMacro(Center,float,3);
00083 
00085 
00087   vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00088   vtkGetMacro(ThetaResolution,int);
00090 
00092 
00094   vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION);
00095   vtkGetMacro(PhiResolution,int);
00097 
00099 
00100   vtkSetClampMacro(StartTheta,float,0.0,360.0);
00101   vtkGetMacro(StartTheta,float);
00103 
00105 
00106   vtkSetClampMacro(EndTheta,float,0.0,360.0);
00107   vtkGetMacro(EndTheta,float);
00109 
00111 
00113   vtkSetClampMacro(StartPhi,float,0.0,360.0);
00114   vtkGetMacro(StartPhi,float);
00116 
00118 
00119   vtkSetClampMacro(EndPhi,float,0.0,360.0);
00120   vtkGetMacro(EndPhi,float);
00122 
00124 
00130   vtkSetMacro(LatLongTessellation,int);
00131   vtkGetMacro(LatLongTessellation,int);
00132   vtkBooleanMacro(LatLongTessellation,int);
00134 
00135 protected:
00136   vtkSphereSource(int res=8);
00137   ~vtkSphereSource() {}
00138 
00139   void Execute();
00140   void ExecuteInformation();
00141   
00142   float Radius;
00143   float Center[3];
00144   int ThetaResolution;
00145   int PhiResolution;
00146   float StartTheta;
00147   float EndTheta;
00148   float StartPhi;
00149   float EndPhi;
00150   int LatLongTessellation;
00151   
00152 private:
00153   vtkSphereSource(const vtkSphereSource&);  // Not implemented.
00154   void operator=(const vtkSphereSource&);  // Not implemented.
00155 };
00156 
00157 #endif
00158 
00159