Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkApproximatingSubdivisionFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkApproximatingSubdivisionFilter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00038 #ifndef __vtkApproximatingSubdivisionFilter_h
00039 #define __vtkApproximatingSubdivisionFilter_h
00040 
00041 #include "vtkPolyDataToPolyDataFilter.h"
00042 
00043 class vtkCellArray;
00044 class vtkCellData;
00045 class vtkIdList;
00046 class vtkIntArray;
00047 class vtkPoints;
00048 class vtkPointData;
00049 
00050 class VTK_GRAPHICS_EXPORT vtkApproximatingSubdivisionFilter : public vtkPolyDataToPolyDataFilter
00051 {
00052 public:
00053   vtkTypeRevisionMacro(vtkApproximatingSubdivisionFilter,vtkPolyDataToPolyDataFilter);
00054   void PrintSelf(ostream& os, vtkIndent indent);
00055 
00057 
00058   vtkSetMacro(NumberOfSubdivisions,int);
00059   vtkGetMacro(NumberOfSubdivisions,int);
00061 
00062 protected:
00063   vtkApproximatingSubdivisionFilter();
00064   ~vtkApproximatingSubdivisionFilter() {};
00065 
00066   void Execute();
00067   virtual void GenerateSubdivisionPoints (vtkPolyData *inputDS,
00068                                           vtkIntArray *edgeData,
00069                                           vtkPoints *outputPts,
00070                                           vtkPointData *outputPD) = 0;
00071   void GenerateSubdivisionCells (vtkPolyData *inputDS, vtkIntArray *edgeData,
00072                                  vtkCellArray *outputPolys,
00073                                  vtkCellData *outputCD);
00074   int FindEdge (vtkPolyData *mesh, vtkIdType cellId, vtkIdType p1,
00075                 vtkIdType p2, vtkIntArray *edgeData, vtkIdList *cellIds);
00076   vtkIdType InterpolatePosition (vtkPoints *inputPts, vtkPoints *outputPts,
00077                                  vtkIdList *stencil, double *weights);
00078   int NumberOfSubdivisions;
00079 private:
00080   vtkApproximatingSubdivisionFilter(const vtkApproximatingSubdivisionFilter&);  // Not implemented.
00081   void operator=(const vtkApproximatingSubdivisionFilter&);  // Not implemented.
00082 };
00083 
00084 #endif
00085 
00086