VTK  9.2.5
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 =========================================================================*/
152 #ifndef vtkPointSource_h
153 #define vtkPointSource_h
154 
155 #include "vtkFiltersSourcesModule.h" // For export macro
156 #include "vtkPolyDataAlgorithm.h"
157 
158 #define VTK_POINT_SHELL 0
159 #define VTK_POINT_UNIFORM 1
160 #define VTK_POINT_EXPONENTIAL 2
161 
162 class vtkRandomSequence;
163 
164 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
165 {
166 public:
168 
171  static vtkPointSource* New();
173  void PrintSelf(ostream& os, vtkIndent indent) override;
175 
177 
180  vtkSetClampMacro(NumberOfPoints, vtkIdType, 1, VTK_ID_MAX);
181  vtkGetMacro(NumberOfPoints, vtkIdType);
183 
185 
188  vtkSetVector3Macro(Center, double);
189  vtkGetVectorMacro(Center, double, 3);
191 
193 
198  vtkSetClampMacro(Radius, double, 0.0, VTK_DOUBLE_MAX);
199  vtkGetMacro(Radius, double);
201 
203 
210  vtkSetClampMacro(Distribution, int, VTK_POINT_SHELL, VTK_POINT_EXPONENTIAL);
211  void SetDistributionToShell() { this->SetDistribution(VTK_POINT_SHELL); }
212  void SetDistributionToUniform() { this->SetDistribution(VTK_POINT_UNIFORM); }
213  void SetDistributionToExponential() { this->SetDistribution(VTK_POINT_EXPONENTIAL); }
214  vtkGetMacro(Distribution, int);
216 
218 
225  vtkSetMacro(Lambda, double);
226  vtkGetMacro(Lambda, double);
228 
230 
235  vtkSetMacro(OutputPointsPrecision, int);
236  vtkGetMacro(OutputPointsPrecision, int);
238 
240 
245  virtual void SetRandomSequence(vtkRandomSequence* randomSequence);
246  vtkGetObjectMacro(RandomSequence, vtkRandomSequence);
248 
249 protected:
250  vtkPointSource(vtkIdType numPts = 10);
251  ~vtkPointSource() override;
252 
254 
255  double Random();
256 
258  double Center[3];
259  double Radius;
261  double Lambda;
264 
265 private:
266  vtkPointSource(const vtkPointSource&) = delete;
267  void operator=(const vtkPointSource&) = delete;
268 };
269 
270 #endif
a simple class to control print indentation
Definition: vtkIndent.h:119
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.
void SetDistributionToUniform()
Specify the point distribution to use.
vtkPointSource(vtkIdType numPts=10)
~vtkPointSource() override
static vtkPointSource * New()
Standard methods for instantiation, type information, and printing.
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