Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

Graphics/vtkPointSource.h

Go to the documentation of this file.
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 =========================================================================*/
00031 #ifndef __vtkPointSource_h
00032 #define __vtkPointSource_h
00033 
00034 #include "vtkPolyDataSource.h"
00035 
00036 #define VTK_POINT_UNIFORM   1
00037 #define VTK_POINT_SHELL     0
00038 
00039 class VTK_GRAPHICS_EXPORT vtkPointSource : public vtkPolyDataSource 
00040 {
00041 public:
00042   static vtkPointSource *New();
00043   vtkTypeRevisionMacro(vtkPointSource,vtkPolyDataSource);
00044   void PrintSelf(ostream& os, vtkIndent indent);
00045   
00047 
00048   vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_LARGE_ID);
00049   vtkGetMacro(NumberOfPoints,vtkIdType);
00051 
00053 
00054   vtkSetVector3Macro(Center,double);
00055   vtkGetVectorMacro(Center,double,3);
00057 
00059 
00062   vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
00063   vtkGetMacro(Radius,double);
00065 
00067 
00070   vtkSetMacro(Distribution,int);
00071   void SetDistributionToUniform() {
00072     this->SetDistribution(VTK_POINT_UNIFORM);};
00073   void SetDistributionToShell() {
00074     this->SetDistribution(VTK_POINT_SHELL);};
00075   vtkGetMacro(Distribution,int);
00077 
00078 protected:
00079   vtkPointSource(vtkIdType numPts=10);
00080   ~vtkPointSource() {};
00081 
00082   void Execute();
00083   void ExecuteInformation();
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