VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkSphereSource.h 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 =========================================================================*/ 00037 #ifndef __vtkSphereSource_h 00038 #define __vtkSphereSource_h 00039 00040 #include "vtkFiltersSourcesModule.h" // For export macro 00041 #include "vtkPolyDataAlgorithm.h" 00042 00043 #define VTK_MAX_SPHERE_RESOLUTION 1024 00044 00045 class VTKFILTERSSOURCES_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm 00046 { 00047 public: 00048 vtkTypeMacro(vtkSphereSource,vtkPolyDataAlgorithm); 00049 void PrintSelf(ostream& os, vtkIndent indent); 00050 00054 static vtkSphereSource *New(); 00055 00057 00058 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00059 vtkGetMacro(Radius,double); 00061 00063 00064 vtkSetVector3Macro(Center,double); 00065 vtkGetVectorMacro(Center,double,3); 00067 00069 00071 vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00072 vtkGetMacro(ThetaResolution,int); 00074 00076 00078 vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00079 vtkGetMacro(PhiResolution,int); 00081 00083 00084 vtkSetClampMacro(StartTheta,double,0.0,360.0); 00085 vtkGetMacro(StartTheta,double); 00087 00089 00090 vtkSetClampMacro(EndTheta,double,0.0,360.0); 00091 vtkGetMacro(EndTheta,double); 00093 00095 00097 vtkSetClampMacro(StartPhi,double,0.0,360.0); 00098 vtkGetMacro(StartPhi,double); 00100 00102 00103 vtkSetClampMacro(EndPhi,double,0.0,360.0); 00104 vtkGetMacro(EndPhi,double); 00106 00108 00114 vtkSetMacro(LatLongTessellation,int); 00115 vtkGetMacro(LatLongTessellation,int); 00116 vtkBooleanMacro(LatLongTessellation,int); 00118 00119 protected: 00120 vtkSphereSource(int res=8); 00121 ~vtkSphereSource() {} 00122 00123 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00124 int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00125 00126 double Radius; 00127 double Center[3]; 00128 int ThetaResolution; 00129 int PhiResolution; 00130 double StartTheta; 00131 double EndTheta; 00132 double StartPhi; 00133 double EndPhi; 00134 int LatLongTessellation; 00135 00136 private: 00137 vtkSphereSource(const vtkSphereSource&); // Not implemented. 00138 void operator=(const vtkSphereSource&); // Not implemented. 00139 }; 00140 00141 #endif