00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkApproximatingSubdivisionFilter_h
00027 #define __vtkApproximatingSubdivisionFilter_h
00028
00029 #include "vtkPolyDataAlgorithm.h"
00030
00031 class vtkCellArray;
00032 class vtkCellData;
00033 class vtkIdList;
00034 class vtkIntArray;
00035 class vtkPoints;
00036 class vtkPointData;
00037
00038 class VTK_GRAPHICS_EXPORT vtkApproximatingSubdivisionFilter : public vtkPolyDataAlgorithm
00039 {
00040 public:
00041 vtkTypeRevisionMacro(vtkApproximatingSubdivisionFilter,vtkPolyDataAlgorithm);
00042 void PrintSelf(ostream& os, vtkIndent indent);
00043
00045
00046 vtkSetMacro(NumberOfSubdivisions,int);
00047 vtkGetMacro(NumberOfSubdivisions,int);
00049
00050 protected:
00051 vtkApproximatingSubdivisionFilter();
00052 ~vtkApproximatingSubdivisionFilter() {};
00053
00054 int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00055 virtual void GenerateSubdivisionPoints (vtkPolyData *inputDS,
00056 vtkIntArray *edgeData,
00057 vtkPoints *outputPts,
00058 vtkPointData *outputPD) = 0;
00059 void GenerateSubdivisionCells (vtkPolyData *inputDS, vtkIntArray *edgeData,
00060 vtkCellArray *outputPolys,
00061 vtkCellData *outputCD);
00062 int FindEdge (vtkPolyData *mesh, vtkIdType cellId, vtkIdType p1,
00063 vtkIdType p2, vtkIntArray *edgeData, vtkIdList *cellIds);
00064 vtkIdType InterpolatePosition (vtkPoints *inputPts, vtkPoints *outputPts,
00065 vtkIdList *stencil, double *weights);
00066 int NumberOfSubdivisions;
00067 private:
00068 vtkApproximatingSubdivisionFilter(const vtkApproximatingSubdivisionFilter&);
00069 void operator=(const vtkApproximatingSubdivisionFilter&);
00070 };
00071
00072 #endif