Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Graphics/vtkApproximatingSubdivisionFilter.h

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