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=========================================================================*/
40#ifndef vtkPointSource_h
41#define vtkPointSource_h
42
43#include "vtkFiltersSourcesModule.h" // For export macro
45
46#define VTK_POINT_SHELL 0
47#define VTK_POINT_UNIFORM 1
48#define VTK_POINT_EXPONENTIAL 2
49
51
52class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
53{
54public:
56
61 void PrintSelf(ostream& os, vtkIndent indent) override;
63
65
68 vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
69 vtkGetMacro(NumberOfPoints, vtkIdType);
71
73
76 vtkSetVector3Macro(Center, double);
77 vtkGetVectorMacro(Center, double, 3);
79
81
86 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
87 vtkGetMacro(Radius, double);
89
91
98 vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
99 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
100 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
101 void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
102 vtkGetMacro(Distribution, int);
104
106
113 vtkSetMacro(Lambda, double);
114 vtkGetMacro(Lambda, double);
116
118
123 vtkSetMacro(OutputPointsPrecision, int);
124 vtkGetMacro(OutputPointsPrecision, int);
126
128
133 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
134 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
136
137protected:
139 ~vtkPointSource() override;
140
142
143 double Random();
144
146 double Center[3];
147 double Radius;
149 double Lambda;
152
153private:
154 vtkPointSource(const vtkPointSource&) = delete;
155 void operator=(const vtkPointSource&) = delete;
156};
157
158#endif
a simple class to control print indentation
Definition vtkIndent.h:34
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