VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/Sources/vtkPointSource.h
Go to the documentation of this file.
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 
00081 
00085   vtkSetMacro(OutputPointsPrecision,int);
00086   vtkGetMacro(OutputPointsPrecision,int);
00088 
00089 protected:
00090   vtkPointSource(vtkIdType numPts=10);
00091   ~vtkPointSource() {}
00092 
00093   int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00094 
00095   vtkIdType NumberOfPoints;
00096   double Center[3];
00097   double Radius;
00098   int Distribution;
00099   int OutputPointsPrecision;
00100 
00101 private:
00102   vtkPointSource(const vtkPointSource&);  // Not implemented.
00103   void operator=(const vtkPointSource&);  // Not implemented.
00104 };
00105 
00106 #endif