VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 =========================================================================*/
43 #ifndef __vtkPolyDataPointSampler_h
44 #define __vtkPolyDataPointSampler_h
45 
46 #include "vtkFiltersModelingModule.h" // For export macro
47 #include "vtkPolyDataAlgorithm.h"
48 
49 class VTKFILTERSMODELING_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm
50 {
51 public:
53  static vtkPolyDataPointSampler *New();
54 
56 
58  void PrintSelf(ostream& os, vtkIndent indent);
60 
62 
64  vtkSetClampMacro(Distance,double,0.0,VTK_FLOAT_MAX);
65  vtkGetMacro(Distance,double);
67 
69 
71  vtkGetMacro(GenerateVertexPoints,int);
72  vtkSetMacro(GenerateVertexPoints,int);
73  vtkBooleanMacro(GenerateVertexPoints,int);
75 
77 
79  vtkGetMacro(GenerateEdgePoints,int);
80  vtkSetMacro(GenerateEdgePoints,int);
81  vtkBooleanMacro(GenerateEdgePoints,int);
83 
85 
87  vtkGetMacro(GenerateInteriorPoints,int);
88  vtkSetMacro(GenerateInteriorPoints,int);
89  vtkBooleanMacro(GenerateInteriorPoints,int);
91 
93 
98  vtkGetMacro(GenerateVertices,int);
99  vtkSetMacro(GenerateVertices,int);
100  vtkBooleanMacro(GenerateVertices,int);
102 
103 protected:
106 
107  int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
108 
109  double Distance;
110  double Distance2;
111 
116 
117  void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
118  void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts,
119  vtkIdType *pts);
120  void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts,
121  vtkIdType npts, vtkIdType *pts);
122 
123 private:
124  vtkPolyDataPointSampler(const vtkPolyDataPointSampler&); // Not implemented.
125  void operator=(const vtkPolyDataPointSampler&); // Not implemented.
126 };
127 
128 #endif
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
generate points from vtkPolyData