VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkPointSource.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 =========================================================================*/ 00032 #ifndef __vtkPointSource_h 00033 #define __vtkPointSource_h 00034 00035 #include "vtkFiltersSourcesModule.h" // For export macro 00036 #include "vtkPolyDataAlgorithm.h" 00037 00038 #define VTK_POINT_UNIFORM 1 00039 #define VTK_POINT_SHELL 0 00040 00041 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm 00042 { 00043 public: 00044 static vtkPointSource *New(); 00045 vtkTypeMacro(vtkPointSource,vtkPolyDataAlgorithm); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00050 vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_ID_MAX); 00051 vtkGetMacro(NumberOfPoints,vtkIdType); 00053 00055 00056 vtkSetVector3Macro(Center,double); 00057 vtkGetVectorMacro(Center,double,3); 00059 00061 00064 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00065 vtkGetMacro(Radius,double); 00067 00069 00072 vtkSetMacro(Distribution,int); 00073 void SetDistributionToUniform() { 00074 this->SetDistribution(VTK_POINT_UNIFORM);}; 00075 void SetDistributionToShell() { 00076 this->SetDistribution(VTK_POINT_SHELL);}; 00077 vtkGetMacro(Distribution,int); 00079 00080 protected: 00081 vtkPointSource(vtkIdType numPts=10); 00082 ~vtkPointSource() {}; 00083 00084 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00085 00086 vtkIdType NumberOfPoints; 00087 double Center[3]; 00088 double Radius; 00089 int Distribution; 00090 00091 private: 00092 vtkPointSource(const vtkPointSource&); // Not implemented. 00093 void operator=(const vtkPointSource&); // Not implemented. 00094 }; 00095 00096 #endif