VTK  9.1.0
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
32
33#define VTK_POINT_UNIFORM 1
34#define VTK_POINT_SHELL 0
35
37
38class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
39{
40public:
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);
78 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
79 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
80 vtkGetMacro(Distribution, int);
82
84
89 vtkSetMacro(OutputPointsPrecision, int);
90 vtkGetMacro(OutputPointsPrecision, int);
92
94
99 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
100 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
102
103protected:
105 ~vtkPointSource() override;
106
108
109 double Random();
110
112 double Center[3];
113 double Radius;
117
118private:
119 vtkPointSource(const vtkPointSource&) = delete;
120 void operator=(const vtkPointSource&) = delete;
121};
122
123#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
Methods invoked by print to print information about the object including superclasses.
void SetDistributionToShell()
Specify the distribution to use.
vtkIdType NumberOfPoints
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkPointSource * New()
void SetDistributionToUniform()
Specify the 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
int vtkIdType
Definition: vtkType.h:332
#define VTK_ID_MAX
Definition: vtkType.h:336
#define VTK_DOUBLE_MAX
Definition: vtkType.h:165