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 "vtkPolyDataAlgorithm.h" 00036 00037 #define VTK_POINT_UNIFORM 1 00038 #define VTK_POINT_SHELL 0 00039 00040 class VTK_GRAPHICS_EXPORT vtkPointSource : public vtkPolyDataAlgorithm 00041 { 00042 public: 00043 static vtkPointSource *New(); 00044 vtkTypeMacro(vtkPointSource,vtkPolyDataAlgorithm); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 00049 vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_LARGE_ID); 00050 vtkGetMacro(NumberOfPoints,vtkIdType); 00052 00054 00055 vtkSetVector3Macro(Center,double); 00056 vtkGetVectorMacro(Center,double,3); 00058 00060 00063 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00064 vtkGetMacro(Radius,double); 00066 00068 00071 vtkSetMacro(Distribution,int); 00072 void SetDistributionToUniform() { 00073 this->SetDistribution(VTK_POINT_UNIFORM);}; 00074 void SetDistributionToShell() { 00075 this->SetDistribution(VTK_POINT_SHELL);}; 00076 vtkGetMacro(Distribution,int); 00078 00079 protected: 00080 vtkPointSource(vtkIdType numPts=10); 00081 ~vtkPointSource() {}; 00082 00083 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00084 00085 vtkIdType NumberOfPoints; 00086 double Center[3]; 00087 double Radius; 00088 int Distribution; 00089 00090 private: 00091 vtkPointSource(const vtkPointSource&); // Not implemented. 00092 void operator=(const vtkPointSource&); // Not implemented. 00093 }; 00094 00095 #endif