VTK
|
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 =========================================================================*/ 00034 #ifndef __vtkSphereSource_h 00035 #define __vtkSphereSource_h 00036 00037 #include "vtkPolyDataAlgorithm.h" 00038 00039 #define VTK_MAX_SPHERE_RESOLUTION 1024 00040 00041 class VTK_GRAPHICS_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm 00042 { 00043 public: 00044 vtkTypeRevisionMacro(vtkSphereSource,vtkPolyDataAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00050 static vtkSphereSource *New(); 00051 00053 00054 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00055 vtkGetMacro(Radius,double); 00057 00059 00060 vtkSetVector3Macro(Center,double); 00061 vtkGetVectorMacro(Center,double,3); 00063 00065 00067 vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00068 vtkGetMacro(ThetaResolution,int); 00070 00072 00074 vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00075 vtkGetMacro(PhiResolution,int); 00077 00079 00080 vtkSetClampMacro(StartTheta,double,0.0,360.0); 00081 vtkGetMacro(StartTheta,double); 00083 00085 00086 vtkSetClampMacro(EndTheta,double,0.0,360.0); 00087 vtkGetMacro(EndTheta,double); 00089 00091 00093 vtkSetClampMacro(StartPhi,double,0.0,360.0); 00094 vtkGetMacro(StartPhi,double); 00096 00098 00099 vtkSetClampMacro(EndPhi,double,0.0,360.0); 00100 vtkGetMacro(EndPhi,double); 00102 00104 00110 vtkSetMacro(LatLongTessellation,int); 00111 vtkGetMacro(LatLongTessellation,int); 00112 vtkBooleanMacro(LatLongTessellation,int); 00114 00115 protected: 00116 vtkSphereSource(int res=8); 00117 ~vtkSphereSource() {} 00118 00119 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00120 int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00121 00122 double Radius; 00123 double Center[3]; 00124 int ThetaResolution; 00125 int PhiResolution; 00126 double StartTheta; 00127 double EndTheta; 00128 double StartPhi; 00129 double EndPhi; 00130 int LatLongTessellation; 00131 00132 private: 00133 vtkSphereSource(const vtkSphereSource&); // Not implemented. 00134 void operator=(const vtkSphereSource&); // Not implemented. 00135 }; 00136 00137 #endif