VTK
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 =========================================================================*/
33 #ifndef vtkPointSource_h
34 #define vtkPointSource_h
35 
36 #include "vtkFiltersSourcesModule.h" // For export macro
37 #include "vtkPolyDataAlgorithm.h"
38 
39 #define VTK_POINT_UNIFORM 1
40 #define VTK_POINT_SHELL 0
41 
42 class vtkRandomSequence;
43 
44 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
45 {
46 public:
47  static vtkPointSource *New();
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
55  vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_ID_MAX);
56  vtkGetMacro(NumberOfPoints,vtkIdType);
58 
60 
63  vtkSetVector3Macro(Center,double);
64  vtkGetVectorMacro(Center,double,3);
66 
68 
73  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
74  vtkGetMacro(Radius,double);
76 
78 
83  vtkSetMacro(Distribution,int);
85  this->SetDistribution(VTK_POINT_UNIFORM);};
87  this->SetDistribution(VTK_POINT_SHELL);};
88  vtkGetMacro(Distribution,int);
90 
92 
97  vtkSetMacro(OutputPointsPrecision,int);
98  vtkGetMacro(OutputPointsPrecision,int);
100 
102 
107  virtual void SetRandomSequence(vtkRandomSequence *randomSequence);
108  vtkGetObjectMacro(RandomSequence,vtkRandomSequence);
110 
111 protected:
112  vtkPointSource(vtkIdType numPts=10);
113  ~vtkPointSource() override;
114 
116 
117  double Random();
118 
120  double Center[3];
121  double Radius;
125 
126 private:
127  vtkPointSource(const vtkPointSource&) = delete;
128  void operator=(const vtkPointSource&) = delete;
129 };
130 
131 #endif
vtkRandomSequence * RandomSequence
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
void SetDistributionToShell()
Specify the distribution to use.
#define VTK_POINT_SHELL
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:347
Generate a sequence of random numbers.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:39
#define VTK_POINT_UNIFORM
void SetDistributionToUniform()
Specify the distribution to use.
#define VTK_ID_MAX
Definition: vtkType.h:351
Store zero or more vtkInformation instances.
create a random cloud of points
vtkIdType NumberOfPoints
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.