VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkPointSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
32 #ifndef __vtkPointSource_h
33 #define __vtkPointSource_h
34 
35 #include "vtkFiltersSourcesModule.h" // For export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 #define VTK_POINT_UNIFORM 1
39 #define VTK_POINT_SHELL 0
40 
41 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
42 {
43 public:
44  static vtkPointSource *New();
45  vtkTypeMacro(vtkPointSource,vtkPolyDataAlgorithm);
46  void PrintSelf(ostream& os, vtkIndent indent);
47 
49 
50  vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_ID_MAX);
51  vtkGetMacro(NumberOfPoints,vtkIdType);
53 
55 
56  vtkSetVector3Macro(Center,double);
57  vtkGetVectorMacro(Center,double,3);
59 
61 
64  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
65  vtkGetMacro(Radius,double);
67 
69 
72  vtkSetMacro(Distribution,int);
74  this->SetDistribution(VTK_POINT_UNIFORM);};
76  this->SetDistribution(VTK_POINT_SHELL);};
77  vtkGetMacro(Distribution,int);
79 
80 protected:
81  vtkPointSource(vtkIdType numPts=10);
83 
84  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
85 
86  vtkIdType NumberOfPoints;
87  double Center[3];
88  double Radius;
90 
91 private:
92  vtkPointSource(const vtkPointSource&); // Not implemented.
93  void operator=(const vtkPointSource&); // Not implemented.
94 };
95 
96 #endif
void SetDistributionToShell()
#define VTK_POINT_SHELL
#define VTK_POINT_UNIFORM
void SetDistributionToUniform()
create a random cloud of points
vtkIdType NumberOfPoints