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 "vtkPolyDataAlgorithm.h" 00041 00042 #define VTK_MAX_SPHERE_RESOLUTION 1024 00043 00044 class VTK_GRAPHICS_EXPORT vtkSphereSource : public vtkPolyDataAlgorithm 00045 { 00046 public: 00047 vtkTypeMacro(vtkSphereSource,vtkPolyDataAlgorithm); 00048 void PrintSelf(ostream& os, vtkIndent indent); 00049 00053 static vtkSphereSource *New(); 00054 00056 00057 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00058 vtkGetMacro(Radius,double); 00060 00062 00063 vtkSetVector3Macro(Center,double); 00064 vtkGetVectorMacro(Center,double,3); 00066 00068 00070 vtkSetClampMacro(ThetaResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00071 vtkGetMacro(ThetaResolution,int); 00073 00075 00077 vtkSetClampMacro(PhiResolution,int,3,VTK_MAX_SPHERE_RESOLUTION); 00078 vtkGetMacro(PhiResolution,int); 00080 00082 00083 vtkSetClampMacro(StartTheta,double,0.0,360.0); 00084 vtkGetMacro(StartTheta,double); 00086 00088 00089 vtkSetClampMacro(EndTheta,double,0.0,360.0); 00090 vtkGetMacro(EndTheta,double); 00092 00094 00096 vtkSetClampMacro(StartPhi,double,0.0,360.0); 00097 vtkGetMacro(StartPhi,double); 00099 00101 00102 vtkSetClampMacro(EndPhi,double,0.0,360.0); 00103 vtkGetMacro(EndPhi,double); 00105 00107 00113 vtkSetMacro(LatLongTessellation,int); 00114 vtkGetMacro(LatLongTessellation,int); 00115 vtkBooleanMacro(LatLongTessellation,int); 00117 00118 protected: 00119 vtkSphereSource(int res=8); 00120 ~vtkSphereSource() {} 00121 00122 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00123 int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00124 00125 double Radius; 00126 double Center[3]; 00127 int ThetaResolution; 00128 int PhiResolution; 00129 double StartTheta; 00130 double EndTheta; 00131 double StartPhi; 00132 double EndPhi; 00133 int LatLongTessellation; 00134 00135 private: 00136 vtkSphereSource(const vtkSphereSource&); // Not implemented. 00137 void operator=(const vtkSphereSource&); // Not implemented. 00138 }; 00139 00140 #endif