00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00030 #ifndef __vtkDataSetSurfaceFilter_h
00031 #define __vtkDataSetSurfaceFilter_h
00032
00033 #include "vtkPolyDataAlgorithm.h"
00034
00035
00036 class vtkPointData;
00037 class vtkPoints;
00038 class vtkIdTypeArray;
00039
00040
00041 struct vtkFastGeomQuadStruct;
00042 typedef struct vtkFastGeomQuadStruct vtkFastGeomQuad;
00043
00044
00045 class VTK_GRAPHICS_EXPORT vtkDataSetSurfaceFilter : public vtkPolyDataAlgorithm
00046 {
00047 public:
00048 static vtkDataSetSurfaceFilter *New();
00049 vtkTypeRevisionMacro(vtkDataSetSurfaceFilter,vtkPolyDataAlgorithm);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00053
00056 vtkSetMacro(UseStrips, int);
00057 vtkGetMacro(UseStrips, int);
00058 vtkBooleanMacro(UseStrips, int);
00060
00062
00065 vtkSetMacro(PieceInvariant, int);
00066 vtkGetMacro(PieceInvariant, int);
00068
00070
00076 vtkSetMacro(PassThroughCellIds,int);
00077 vtkGetMacro(PassThroughCellIds,int);
00078 vtkBooleanMacro(PassThroughCellIds,int);
00079 vtkSetMacro(PassThroughPointIds,int);
00080 vtkGetMacro(PassThroughPointIds,int);
00081 vtkBooleanMacro(PassThroughPointIds,int);
00083
00084 protected:
00085 vtkDataSetSurfaceFilter();
00086 ~vtkDataSetSurfaceFilter();
00087
00088 int UseStrips;
00089
00090 virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00091
00092 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00093 virtual int FillInputPortInformation(int port, vtkInformation *info);
00094 int StructuredExecute(vtkDataSet *input, vtkPolyData *output, vtkIdType *ext,
00095 vtkInformation *inInfo);
00096 int UnstructuredGridExecute(vtkDataSet *input, vtkPolyData *output);
00097 int DataSetExecute(vtkDataSet *input, vtkPolyData *output);
00098
00099
00100 void ExecuteFaceStrips(vtkDataSet *input, vtkPolyData *output,
00101 int maxFlag, vtkIdType *ext,
00102 int aAxis, int bAxis, int cAxis,
00103 vtkInformation *inInfo);
00104 void ExecuteFaceQuads(vtkDataSet *input, vtkPolyData *output,
00105 int maxFlag, vtkIdType *ext,
00106 int aAxis, int bAxis, int cAxis,
00107 vtkInformation *inInfo);
00108
00109 void InitializeQuadHash(vtkIdType numPoints);
00110 void DeleteQuadHash();
00111 void InsertQuadInHash(vtkIdType a, vtkIdType b, vtkIdType c, vtkIdType d,
00112 vtkIdType sourceId);
00113 void InsertTriInHash(vtkIdType a, vtkIdType b, vtkIdType c,
00114 vtkIdType sourceId);
00115 void InsertPentaInHash(vtkIdType a, vtkIdType b,
00116 vtkIdType c, vtkIdType d,
00117 vtkIdType e,
00118 vtkIdType sourceId);
00119 void InsertHexInHash(vtkIdType a, vtkIdType b,
00120 vtkIdType c, vtkIdType d,
00121 vtkIdType e, vtkIdType f,
00122 vtkIdType sourceId);
00123 void InitQuadHashTraversal();
00124 vtkFastGeomQuad *GetNextVisibleQuadFromHash();
00125
00126 vtkFastGeomQuad **QuadHash;
00127 vtkIdType QuadHashLength;
00128 vtkFastGeomQuad *QuadHashTraversal;
00129 vtkIdType QuadHashTraversalIndex;
00130
00131 vtkIdType *PointMap;
00132 vtkIdType GetOutputPointId(vtkIdType inPtId, vtkDataSet *input,
00133 vtkPoints *outPts, vtkPointData *outPD);
00134
00135 vtkIdType NumberOfNewCells;
00136
00137
00138 void InitFastGeomQuadAllocation(int numberOfCells);
00139 vtkFastGeomQuad* NewFastGeomQuad();
00140 void DeleteAllFastGeomQuads();
00141
00142 int FastGeomQuadArrayLength;
00143 int NumberOfFastGeomQuadArrays;
00144 vtkFastGeomQuad** FastGeomQuadArrays;
00145
00146 int NextArrayIndex;
00147 int NextQuadIndex;
00148
00149 int PieceInvariant;
00150
00151 int PassThroughCellIds;
00152 void RecordOrigCellId(vtkIdType newIndex, vtkIdType origId);
00153 vtkIdTypeArray *OriginalCellIds;
00154
00155 int PassThroughPointIds;
00156 void RecordOrigPointId(vtkIdType newIndex, vtkIdType origId);
00157 vtkIdTypeArray *OriginalPointIds;
00158
00159 private:
00160 vtkDataSetSurfaceFilter(const vtkDataSetSurfaceFilter&);
00161 void operator=(const vtkDataSetSurfaceFilter&);
00162 };
00163
00164 #endif