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 =========================================================================*/
27 #ifndef vtkPointSource_h
28 #define vtkPointSource_h
29 
30 #include "vtkFiltersSourcesModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 #define VTK_POINT_UNIFORM 1
34 #define VTK_POINT_SHELL 0
35 
36 class vtkRandomSequence;
37 
38 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
39 {
40 public:
41  static vtkPointSource *New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_ID_MAX);
50  vtkGetMacro(NumberOfPoints,vtkIdType);
52 
54 
57  vtkSetVector3Macro(Center,double);
58  vtkGetVectorMacro(Center,double,3);
60 
62 
67  vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
68  vtkGetMacro(Radius,double);
70 
72 
77  vtkSetMacro(Distribution,int);
79  this->SetDistribution(VTK_POINT_UNIFORM);};
81  this->SetDistribution(VTK_POINT_SHELL);};
82  vtkGetMacro(Distribution,int);
84 
86 
91  vtkSetMacro(OutputPointsPrecision,int);
92  vtkGetMacro(OutputPointsPrecision,int);
94 
96 
101  virtual void SetRandomSequence(vtkRandomSequence *randomSequence);
102  vtkGetObjectMacro(RandomSequence,vtkRandomSequence);
104 
105 protected:
106  vtkPointSource(vtkIdType numPts=10);
107  ~vtkPointSource() override;
108 
110 
111  double Random();
112 
114  double Center[3];
115  double Radius;
119 
120 private:
121  vtkPointSource(const vtkPointSource&) = delete;
122  void operator=(const vtkPointSource&) = delete;
123 };
124 
125 #endif
vtkRandomSequence
Generate a sequence of random numbers.
Definition: vtkRandomSequence.h:37
vtkPointSource::SetDistributionToUniform
void SetDistributionToUniform()
Definition: vtkPointSource.h:78
vtkPointSource::Distribution
int Distribution
Definition: vtkPointSource.h:116
vtkIdType
int vtkIdType
Definition: vtkType.h:347
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkPointSource
create a random cloud of points
Definition: vtkPointSource.h:38
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
vtkPointSource::NumberOfPoints
vtkIdType NumberOfPoints
Definition: vtkPointSource.h:113
VTK_POINT_UNIFORM
#define VTK_POINT_UNIFORM
Definition: vtkPointSource.h:33
VTK_ID_MAX
#define VTK_ID_MAX
Definition: vtkType.h:351
vtkPointSource::Radius
double Radius
Definition: vtkPointSource.h:115
vtkPointSource::SetDistributionToShell
void SetDistributionToShell()
Definition: vtkPointSource.h:80
vtkPointSource::RandomSequence
vtkRandomSequence * RandomSequence
Definition: vtkPointSource.h:118
VTK_DOUBLE_MAX
#define VTK_DOUBLE_MAX
Definition: vtkType.h:169
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPointSource::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkPointSource.h:117
VTK_POINT_SHELL
#define VTK_POINT_SHELL
Definition: vtkPointSource.h:34
vtkPolyDataAlgorithm
Superclass for algorithms that produce only polydata as output.
Definition: vtkPolyDataAlgorithm.h:41