VTK  9.2.6
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=========================================================================*/
43#ifndef vtkPointSource_h
44#define vtkPointSource_h
45
46#include "vtkFiltersSourcesModule.h" // For export macro
48
49#define VTK_POINT_SHELL 0
50#define VTK_POINT_UNIFORM 1
51#define VTK_POINT_EXPONENTIAL 2
52
54
55class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
56{
57public:
59
64 void PrintSelf(ostream& os, vtkIndent indent) override;
66
68
71 vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
72 vtkGetMacro(NumberOfPoints, vtkIdType);
74
76
79 vtkSetVector3Macro(Center, double);
80 vtkGetVectorMacro(Center, double, 3);
82
84
89 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
90 vtkGetMacro(Radius, double);
92
94
101 vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
102 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
103 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
104 void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
105 vtkGetMacro(Distribution, int);
107
109
116 vtkSetMacro(Lambda, double);
117 vtkGetMacro(Lambda, double);
119
121
126 vtkSetMacro(OutputPointsPrecision, int);
127 vtkGetMacro(OutputPointsPrecision, int);
129
131
136 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
137 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
139
140protected:
142 ~vtkPointSource() override;
143
145
146 double Random();
147
149 double Center[3];
150 double Radius;
152 double Lambda;
155
156private:
157 vtkPointSource(const vtkPointSource&) = delete;
158 void operator=(const vtkPointSource&) = delete;
159};
160
161#endif
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a random cloud of points
vtkRandomSequence * RandomSequence
double Random()
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiation, type information, and printing.
void SetDistributionToShell()
Specify the point distribution to use.
vtkIdType NumberOfPoints
void SetDistributionToExponential()
Specify the point distribution to use.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkPointSource * New()
Standard methods for instantiation, type information, and printing.
void SetDistributionToUniform()
Specify the point distribution to use.
vtkPointSource(vtkIdType numPts=10)
~vtkPointSource() override
virtual void SetRandomSequence(vtkRandomSequence *randomSequence)
Set/Get a random sequence generator.
Superclass for algorithms that produce only polydata as output.
Generate a sequence of random numbers.
#define VTK_POINT_UNIFORM
#define VTK_POINT_SHELL
#define VTK_POINT_EXPONENTIAL
int vtkIdType
Definition vtkType.h:332
#define VTK_ID_MAX
Definition vtkType.h:336
#define VTK_DOUBLE_MAX
Definition vtkType.h:165