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 =========================================================================*/
27 #ifndef vtkPointSource_h
28 #define vtkPointSource_h
29 
30 #include "vtkFiltersSourcesModule.h" // For export macro
31 #include "vtkPolyDataAlgorithm.h"
32 
33 #define VTK_POINT_UNIFORM 1
34 #define VTK_POINT_SHELL 0
35 
36 class vtkRandomSequence;
37 
38 class VTKFILTERSSOURCES_EXPORT vtkPointSource : public vtkPolyDataAlgorithm
39 {
40 public:
41  static vtkPointSource *New();
43  void PrintSelf(ostream& os, vtkIndent indent) VTK_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);
79  this->SetDistribution(VTK_POINT_UNIFORM);};
81  this->SetDistribution(VTK_POINT_SHELL);};
82  vtkGetMacro(Distribution,int);
84 
86 
91  vtkSetMacro(OutputPointsPrecision,int);
92  vtkGetMacro(OutputPointsPrecision,int);
94 
96 
101  virtual void SetRandomSequence(vtkRandomSequence *randomSequence);
102  vtkGetObjectMacro(RandomSequence,vtkRandomSequence);
104 
105 protected:
106  vtkPointSource(vtkIdType numPts=10);
107  ~vtkPointSource() VTK_OVERRIDE;
108 
110 
111  double Random();
112 
114  double Center[3];
115  double Radius;
119 
120 private:
121  vtkPointSource(const vtkPointSource&) VTK_DELETE_FUNCTION;
122  void operator=(const vtkPointSource&) VTK_DELETE_FUNCTION;
123 };
124 
125 #endif
vtkRandomSequence * RandomSequence
#define VTK_DOUBLE_MAX
Definition: vtkType.h:167
void SetDistributionToShell()
Specify the distribution to use.
#define VTK_POINT_SHELL
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
int vtkIdType
Definition: vtkType.h:345
Sequence of random numbers.
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
#define VTK_POINT_UNIFORM
void SetDistributionToUniform()
Specify the distribution to use.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
#define VTK_ID_MAX
Definition: vtkType.h:349
Store zero or more vtkInformation instances.
create a random cloud of points
vtkIdType NumberOfPoints
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.