VTK  9.3.0
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
31#ifndef vtkPointSource_h
32#define vtkPointSource_h
33
34#include "vtkFiltersSourcesModule.h" // For export macro
36
37#define VTK_POINT_SHELL 0
38#define VTK_POINT_UNIFORM 1
39#define VTK_POINT_EXPONENTIAL 2
40
41VTK_ABI_NAMESPACE_BEGIN
43
44class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
45{
46public:
48
53 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
60 vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
61 vtkGetMacro(NumberOfPoints, vtkIdType);
63
65
68 vtkSetVector3Macro(Center, double);
69 vtkGetVectorMacro(Center, double, 3);
71
73
78 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
79 vtkGetMacro(Radius, double);
81
83
90 vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
91 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
92 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
93 void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
94 vtkGetMacro(Distribution, int);
96
98
105 vtkSetMacro(Lambda, double);
106 vtkGetMacro(Lambda, double);
108
110
115 vtkSetMacro(OutputPointsPrecision, int);
116 vtkGetMacro(OutputPointsPrecision, int);
118
120
125 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
126 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
128
129protected:
131 ~vtkPointSource() override;
132
134
135 double Random();
136
138 double Center[3];
139 double Radius;
141 double Lambda;
144
145private:
146 vtkPointSource(const vtkPointSource&) = delete;
147 void operator=(const vtkPointSource&) = delete;
148};
149
150VTK_ABI_NAMESPACE_END
151#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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:315
#define VTK_ID_MAX
Definition vtkType.h:319
#define VTK_DOUBLE_MAX
Definition vtkType.h:154