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 00120 00124 vtkSetMacro(OutputPointsPrecision,int); 00125 vtkGetMacro(OutputPointsPrecision,int); 00127 00128 protected: 00129 vtkSphereSource(int res=8); 00130 ~vtkSphereSource() {} 00131 00132 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00133 int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00134 00135 double Radius; 00136 double Center[3]; 00137 int ThetaResolution; 00138 int PhiResolution; 00139 double StartTheta; 00140 double EndTheta; 00141 double StartPhi; 00142 double EndPhi; 00143 int LatLongTessellation; 00144 int OutputPointsPrecision; 00145 00146 private: 00147 vtkSphereSource(const vtkSphereSource&); // Not implemented. 00148 void operator=(const vtkSphereSource&); // Not implemented. 00149 }; 00150 00151 #endif