00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00043 #ifndef __vtkPolyDataPointSampler_h
00044 #define __vtkPolyDataPointSampler_h
00045
00046 #include "vtkPolyDataAlgorithm.h"
00047
00048 class VTK_GRAPHICS_EXPORT vtkPolyDataPointSampler : public vtkPolyDataAlgorithm
00049 {
00050 public:
00052 static vtkPolyDataPointSampler *New();
00053
00055
00056 vtkTypeRevisionMacro(vtkPolyDataPointSampler,vtkPolyDataAlgorithm);
00057 void PrintSelf(ostream& os, vtkIndent indent);
00059
00061
00063 vtkSetClampMacro(Distance,double,0.0,VTK_LARGE_FLOAT);
00064 vtkGetMacro(Distance,double);
00066
00068
00070 vtkGetMacro(GenerateVertexPoints,int);
00071 vtkSetMacro(GenerateVertexPoints,int);
00072 vtkBooleanMacro(GenerateVertexPoints,int);
00074
00076
00078 vtkGetMacro(GenerateEdgePoints,int);
00079 vtkSetMacro(GenerateEdgePoints,int);
00080 vtkBooleanMacro(GenerateEdgePoints,int);
00082
00084
00086 vtkGetMacro(GenerateInteriorPoints,int);
00087 vtkSetMacro(GenerateInteriorPoints,int);
00088 vtkBooleanMacro(GenerateInteriorPoints,int);
00090
00092
00096 vtkGetMacro(GenerateVertices,int);
00097 vtkSetMacro(GenerateVertices,int);
00098 vtkBooleanMacro(GenerateVertices,int);
00100
00101 protected:
00102 vtkPolyDataPointSampler();
00103 ~vtkPolyDataPointSampler() {}
00104
00105 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00106
00107 double Distance;
00108 double Distance2;
00109
00110 int GenerateVertexPoints;
00111 int GenerateEdgePoints;
00112 int GenerateInteriorPoints;
00113 int GenerateVertices;
00114
00115 void SampleEdge(vtkPoints *pts, double x0[3], double x1[3]);
00116 void SampleTriangle(vtkPoints *newPts, vtkPoints *inPts,
00117 vtkIdType *pts);
00118 void SamplePolygon(vtkPoints *newPts, vtkPoints *inPts,
00119 vtkIdType npts, vtkIdType *pts);
00120
00121 private:
00122 vtkPolyDataPointSampler(const vtkPolyDataPointSampler&);
00123 void operator=(const vtkPolyDataPointSampler&);
00124 };
00125
00126 #endif