VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkTexturedSphereSource.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 =========================================================================*/ 00028 #ifndef __vtkTexturedSphereSource_h 00029 #define __vtkTexturedSphereSource_h 00030 00031 #include "vtkPolyDataAlgorithm.h" 00032 00033 #define VTK_MAX_SPHERE_RESOLUTION 1024 00034 00035 class VTK_GRAPHICS_EXPORT vtkTexturedSphereSource : public vtkPolyDataAlgorithm 00036 { 00037 public: 00038 vtkTypeRevisionMacro(vtkTexturedSphereSource,vtkPolyDataAlgorithm); 00039 void PrintSelf(ostream& os, vtkIndent indent); 00040 00043 static vtkTexturedSphereSource *New(); 00044 00046 00047 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00048 vtkGetMacro(Radius,double); 00050 00052 00053 vtkSetClampMacro(ThetaResolution,int,4,VTK_MAX_SPHERE_RESOLUTION); 00054 vtkGetMacro(ThetaResolution,int); 00056 00058 00059 vtkSetClampMacro(PhiResolution,int,4,VTK_MAX_SPHERE_RESOLUTION); 00060 vtkGetMacro(PhiResolution,int); 00062 00064 00065 vtkSetClampMacro(Theta,double,0.0,360.0); 00066 vtkGetMacro(Theta,double); 00068 00070 00071 vtkSetClampMacro(Phi,double,0.0,180.0); 00072 vtkGetMacro(Phi,double); 00074 00075 protected: 00076 vtkTexturedSphereSource(int res=8); 00077 ~vtkTexturedSphereSource() {}; 00078 00079 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00080 double Radius; 00081 double Theta; 00082 double Phi; 00083 int ThetaResolution; 00084 int PhiResolution; 00085 00086 private: 00087 vtkTexturedSphereSource(const vtkTexturedSphereSource&); // Not implemented. 00088 void operator=(const vtkTexturedSphereSource&); // Not implemented. 00089 }; 00090 00091 #endif