VTK
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=========================================================================*/
33#ifndef vtkPointSource_h
34#define vtkPointSource_h
35
36#include "vtkFiltersSourcesModule.h" // For export macro
38
39#define VTK_POINT_UNIFORM 1
40#define VTK_POINT_SHELL 0
41
43
44class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
45{
46public:
49 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
50
52
55 vtkSetClampMacro(NumberOfPoints,vtkIdType,1,VTK_ID_MAX);
56 vtkGetMacro(NumberOfPoints,vtkIdType);
58
60
63 vtkSetVector3Macro(Center,double);
64 vtkGetVectorMacro(Center,double,3);
66
68
73 vtkSetClampMacro(Radius,double,0.0,VTK_DOUBLE_MAX);
74 vtkGetMacro(Radius,double);
76
78
83 vtkSetMacro(Distribution,int);
85 this->SetDistribution(VTK_POINT_UNIFORM);};
87 this->SetDistribution(VTK_POINT_SHELL);};
88 vtkGetMacro(Distribution,int);
90
92
97 vtkSetMacro(OutputPointsPrecision,int);
98 vtkGetMacro(OutputPointsPrecision,int);
100
102
107 virtual void SetRandomSequence(vtkRandomSequence *randomSequence);
108 vtkGetObjectMacro(RandomSequence,vtkRandomSequence);
110
111protected:
113 ~vtkPointSource() VTK_OVERRIDE;
114
115 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) VTK_OVERRIDE;
116
117 double Random();
118
119 vtkIdType NumberOfPoints;
120 double Center[3];
121 double Radius;
122 int Distribution;
123 int OutputPointsPrecision;
124 vtkRandomSequence* RandomSequence;
125
126private:
127 vtkPointSource(const vtkPointSource&) VTK_DELETE_FUNCTION;
128 void operator=(const vtkPointSource&) VTK_DELETE_FUNCTION;
129};
130
131#endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
create a random cloud of points
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetDistributionToShell()
static vtkPointSource * New()
void SetDistributionToUniform()
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.
Sequence of random numbers.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_POINT_UNIFORM
#define VTK_POINT_SHELL
int vtkIdType
Definition: vtkType.h:287
#define VTK_ID_MAX
Definition: vtkType.h:291
#define VTK_DOUBLE_MAX
Definition: vtkType.h:163