VTK  9.5.20250916
vtkPointSource.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
140#ifndef vtkPointSource_h
141#define vtkPointSource_h
142
143#include "vtkFiltersSourcesModule.h" // For export macro
144#include "vtkPolyDataAlgorithm.h"
145#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
146
147#define VTK_POINT_SHELL 0
148#define VTK_POINT_UNIFORM 1
149#define VTK_POINT_EXPONENTIAL 2
150
151VTK_ABI_NAMESPACE_BEGIN
153
154class VTKFILTERSSOURCES_EXPORT VTK_MARSHALAUTO vtkPointSource : public vtkPolyDataAlgorithm
155{
156public:
158
163 void PrintSelf(ostream& os, vtkIndent indent) override;
165
167
170 vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
171 vtkGetMacro(NumberOfPoints, vtkIdType);
173
175
178 vtkSetVector3Macro(Center, double);
179 vtkGetVectorMacro(Center, double, 3);
181
183
188 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
189 vtkGetMacro(Radius, double);
191
193
200 vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
201 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
202 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
203 void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
204 vtkGetMacro(Distribution, int);
206
208
215 vtkSetMacro(Lambda, double);
216 vtkGetMacro(Lambda, double);
218
220
225 vtkSetMacro(OutputPointsPrecision, int);
226 vtkGetMacro(OutputPointsPrecision, int);
228
230
235 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
236 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
238
239protected:
241 ~vtkPointSource() override;
242
244
245 double Random();
246
248 double Center[3];
249 double Radius;
251 double Lambda;
254
255private:
256 vtkPointSource(const vtkPointSource&) = delete;
257 void operator=(const vtkPointSource&) = delete;
258};
259
260VTK_ABI_NAMESPACE_END
261#endif
a simple class to control print indentation
Definition vtkIndent.h:108
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:333
#define VTK_ID_MAX
Definition vtkType.h:337
#define VTK_DOUBLE_MAX
Definition vtkType.h:172
#define VTK_MARSHALAUTO