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

vtkDataSetSurfaceFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkDataSetSurfaceFilter.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 =========================================================================*/
00030 #ifndef __vtkDataSetSurfaceFilter_h
00031 #define __vtkDataSetSurfaceFilter_h
00032 
00033 #include "vtkPolyDataAlgorithm.h"
00034 
00035 
00036 class vtkPointData;
00037 class vtkPoints;
00038 //BTX
00039 struct vtkFastGeomQuadStruct;
00040 typedef struct vtkFastGeomQuadStruct vtkFastGeomQuad;
00041 //ETX
00042 
00043 class VTK_GRAPHICS_EXPORT vtkDataSetSurfaceFilter : public vtkPolyDataAlgorithm
00044 {
00045 public:
00046   static vtkDataSetSurfaceFilter *New();
00047   vtkTypeRevisionMacro(vtkDataSetSurfaceFilter,vtkPolyDataAlgorithm);
00048   void PrintSelf(ostream& os, vtkIndent indent);
00049 
00051 
00054   vtkSetMacro(UseStrips, int);
00055   vtkGetMacro(UseStrips, int);
00056   vtkBooleanMacro(UseStrips, int);
00058 
00060 
00063   vtkSetMacro(PieceInvariant, int);
00064   vtkGetMacro(PieceInvariant, int);
00066 
00067 protected:
00068   vtkDataSetSurfaceFilter();
00069   ~vtkDataSetSurfaceFilter();
00070 
00071   int UseStrips;
00072   
00073   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00074 
00075   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00076   virtual int FillInputPortInformation(int port, vtkInformation *info);
00077   int StructuredExecute(vtkDataSet *input, vtkPolyData *output, int *ext,
00078                          vtkInformation *inInfo);
00079   int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output);
00080   int DataSetExecute(vtkDataSet *input, vtkPolyData *output);
00081 
00082   // Helper methods.
00083   void ExecuteFaceStrips(vtkDataSet *input, vtkPolyData *output,
00084                          int maxFlag, int *ext,
00085                          int aAxis, int bAxis, int cAxis,
00086                          vtkInformation *inInfo);
00087   void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output,
00088                         int maxFlag, int *ext,
00089                         int aAxis, int bAxis, int cAxis,
00090                         vtkInformation *inInfo);
00091 
00092   void InitializeQuadHash(vtkIdType numPoints);
00093   void DeleteQuadHash();
00094   void InsertQuadInHash(vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType d,
00095                         vtkIdType sourceId);
00096   void InsertTriInHash(vtkIdType a, vtkIdType b, vtkIdType c,
00097                        vtkIdType sourceId);
00098   void InsertPentaInHash(vtkIdType a, vtkIdType b,
00099                        vtkIdType c, vtkIdType d,
00100                        vtkIdType e, 
00101                        vtkIdType sourceId);
00102   void InsertHexInHash(vtkIdType a, vtkIdType b,
00103                        vtkIdType c, vtkIdType d,
00104                        vtkIdType e, vtkIdType f,
00105                        vtkIdType sourceId);
00106   void InitQuadHashTraversal();
00107   vtkFastGeomQuad *GetNextVisibleQuadFromHash();
00108 
00109   vtkFastGeomQuad **QuadHash;
00110   vtkIdType QuadHashLength;
00111   vtkFastGeomQuad *QuadHashTraversal;
00112   vtkIdType QuadHashTraversalIndex;
00113 
00114   vtkIdType *PointMap;
00115   vtkIdType GetOutputPointId(vtkIdType inPtId, vtkDataSet *input, 
00116                              vtkPoints *outPts, vtkPointData *outPD);
00117   
00118   vtkIdType NumberOfNewCells;
00119   
00120   // Better memory allocation for faces (hash)
00121   void InitFastGeomQuadAllocation(int numberOfCells);
00122   vtkFastGeomQuad* NewFastGeomQuad();
00123   void DeleteAllFastGeomQuads();
00124   // -----
00125   int FastGeomQuadArrayLength;
00126   int NumberOfFastGeomQuadArrays;
00127   vtkFastGeomQuad** FastGeomQuadArrays;
00128   // These indexes allow us to find the next available face.
00129   int NextArrayIndex;
00130   int NextQuadIndex;
00131 
00132   int PieceInvariant;
00133 
00134 private:
00135   vtkDataSetSurfaceFilter(const vtkDataSetSurfaceFilter&);  // Not implemented.
00136   void operator=(const vtkDataSetSurfaceFilter&);  // Not implemented.
00137 };
00138 
00139 #endif

Generated on Mon Jan 21 23:07:24 2008 for VTK by  doxygen 1.4.3-20050530