VTK
vtkPolyDataPointSampler.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPolyDataPointSampler.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 =========================================================================*/
41 #ifndef vtkPolyDataPointSampler_h
42 #define vtkPolyDataPointSampler_h
43 
44 #include "vtkFiltersModelingModule.h" // For export macro
45 #include "vtkPolyDataAlgorithm.h"
46 
47 class VTKFILTERSMODELING_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm
48 {
49 public:
53  static vtkPolyDataPointSampler *New();
54 
56 
60  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
62 
64 
68  vtkSetClampMacro(Distance,double,0.0,VTK_FLOAT_MAX);
69  vtkGetMacro(Distance,double);
71 
73 
77  vtkGetMacro(GenerateVertexPoints,int);
78  vtkSetMacro(GenerateVertexPoints,int);
79  vtkBooleanMacro(GenerateVertexPoints,int);
81 
83 
87  vtkGetMacro(GenerateEdgePoints,int);
88  vtkSetMacro(GenerateEdgePoints,int);
89  vtkBooleanMacro(GenerateEdgePoints,int);
91 
93 
97  vtkGetMacro(GenerateInteriorPoints,int);
98  vtkSetMacro(GenerateInteriorPoints,int);
99  vtkBooleanMacro(GenerateInteriorPoints,int);
101 
103 
110  vtkGetMacro(GenerateVertices,int);
111  vtkSetMacro(GenerateVertices,int);
112  vtkBooleanMacro(GenerateVertices,int);
114 
115 protected:
117  ~vtkPolyDataPointSampler() VTK_OVERRIDE {}
118 
120 
121  double Distance;
122  double Distance2;
123 
124  int GenerateVertexPoints;
125  int GenerateEdgePoints;
126  int GenerateInteriorPoints;
127  int GenerateVertices;
128 
129  void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
130  void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts,
131  vtkIdType *pts);
132  void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts,
133  vtkIdType npts, vtkIdType *pts);
134 
135 private:
136  vtkPolyDataPointSampler(const vtkPolyDataPointSampler&) VTK_DELETE_FUNCTION;
137  void operator=(const vtkPolyDataPointSampler&) VTK_DELETE_FUNCTION;
138 };
139 
140 #endif
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
static vtkPolyDataAlgorithm * New()
#define VTK_FLOAT_MAX
Definition: vtkType.h:165
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
generate points from vtkPolyData
represent and manipulate 3D points
Definition: vtkPoints.h:33
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.