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=========================================================================*/
52#ifndef vtkPointSource_h
53#define vtkPointSource_h
54
55#include "vtkFiltersSourcesModule.h" // For export macro
57
58#define VTK_POINT_SHELL 0
59#define VTK_POINT_UNIFORM 1
60#define VTK_POINT_EXPONENTIAL 2
61
63
64class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
65{
66public:
68
73 void PrintSelf(ostream& os, vtkIndent indent) override;
75
77
80 vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
81 vtkGetMacro(NumberOfPoints, vtkIdType);
83
85
88 vtkSetVector3Macro(Center, double);
89 vtkGetVectorMacro(Center, double, 3);
91
93
98 vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
99 vtkGetMacro(Radius, double);
101
103
110 vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
111 void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
112 void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
113 void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
114 vtkGetMacro(Distribution, int);
116
118
125 vtkSetMacro(Lambda, double);
126 vtkGetMacro(Lambda, double);
128
130
135 vtkSetMacro(OutputPointsPrecision, int);
136 vtkGetMacro(OutputPointsPrecision, int);
138
140
145 virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
146 vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
148
149protected:
151 ~vtkPointSource() override;
152
154
155 double Random();
156
158 double Center[3];
159 double Radius;
161 double Lambda;
164
165private:
166 vtkPointSource(const vtkPointSource&) = delete;
167 void operator=(const vtkPointSource&) = delete;
168};
169
170#endif
a simple class to control print indentation
Definition vtkIndent.h:49
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