VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkPointSource.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 __vtkPointSource_h 00029 #define __vtkPointSource_h 00030 00031 #include "vtkPolyDataAlgorithm.h" 00032 00033 #define VTK_POINT_UNIFORM 1 00034 #define VTK_POINT_SHELL 0 00035 00036 class VTK_GRAPHICS_EXPORT vtkPointSource : public vtkPolyDataAlgorithm 00037 { 00038 public: 00039 static vtkPointSource *New(); 00040 vtkTypeRevisionMacro(vtkPointSource,vtkPolyDataAlgorithm); 00041 void PrintSelf(ostream& os, vtkIndent indent); 00042 00044 00045 vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_LARGE_ID); 00046 vtkGetMacro(NumberOfPoints,vtkIdType); 00048 00050 00051 vtkSetVector3Macro(Center,double); 00052 vtkGetVectorMacro(Center,double,3); 00054 00056 00059 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX); 00060 vtkGetMacro(Radius,double); 00062 00064 00067 vtkSetMacro(Distribution,int); 00068 void SetDistributionToUniform() { 00069 this->SetDistribution(VTK_POINT_UNIFORM);}; 00070 void SetDistributionToShell() { 00071 this->SetDistribution(VTK_POINT_SHELL);}; 00072 vtkGetMacro(Distribution,int); 00074 00075 protected: 00076 vtkPointSource(vtkIdType numPts=10); 00077 ~vtkPointSource() {}; 00078 00079 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00080 00081 vtkIdType NumberOfPoints; 00082 double Center[3]; 00083 double Radius; 00084 int Distribution; 00085 00086 private: 00087 vtkPointSource(const vtkPointSource&); // Not implemented. 00088 void operator=(const vtkPointSource&); // Not implemented. 00089 }; 00090 00091 #endif