vtkMergeCells.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00055 #ifndef __vtkMergeCells_h
00056 #define __vtkMergeCells_h
00057
00058 #include "vtkObject.h"
00059 #include "vtkDataSetAttributes.h"
00060
00061 class vtkDataSet;
00062 class vtkUnstructuredGrid;
00063 class vtkPointData;
00064 class vtkCellData;
00065 class vtkMergeCellsSTLCloak;
00066
00067 class VTK_PARALLEL_EXPORT vtkMergeCells : public vtkObject
00068 {
00069 public:
00070 vtkTypeRevisionMacro(vtkMergeCells, vtkObject);
00071 virtual void PrintSelf(ostream &os, vtkIndent indent);
00072
00073 static vtkMergeCells *New();
00074
00079 virtual void SetUnstructuredGrid(vtkUnstructuredGrid*);
00080 vtkGetObjectMacro(UnstructuredGrid, vtkUnstructuredGrid);
00081
00085 vtkSetMacro(TotalNumberOfCells, vtkIdType);
00086 vtkGetMacro(TotalNumberOfCells, vtkIdType);
00087
00092 vtkSetMacro(TotalNumberOfPoints, vtkIdType);
00093 vtkGetMacro(TotalNumberOfPoints, vtkIdType);
00094
00099 vtkSetStringMacro(GlobalIdArrayName);
00100 vtkGetStringMacro(GlobalIdArrayName);
00101
00107 vtkSetClampMacro(PointMergeTolerance, float, 0.0, .25);
00108 vtkGetMacro(PointMergeTolerance, float);
00109
00113 vtkSetStringMacro(GlobalCellIdArrayName);
00114 vtkGetStringMacro(GlobalCellIdArrayName);
00115
00120 vtkSetMacro(MergeDuplicatePoints, int);
00121 vtkGetMacro(MergeDuplicatePoints, int);
00122 vtkBooleanMacro(MergeDuplicatePoints, int);
00123
00128 vtkSetMacro(TotalNumberOfDataSets, int);
00129 vtkGetMacro(TotalNumberOfDataSets, int);
00130
00137 int MergeDataSet(vtkDataSet *set);
00138
00143 void Finish();
00144
00145 protected:
00146
00147 vtkMergeCells();
00148 ~vtkMergeCells();
00149
00150 private:
00151
00152 void FreeLists();
00153 void StartUGrid(vtkDataSet *set);
00154 vtkIdType *MapPointsToIdsUsingGlobalIds(vtkDataSet *set);
00155 vtkIdType *MapPointsToIdsUsingLocator(vtkDataSet *set);
00156 vtkIdType AddNewCellsUnstructuredGrid(vtkDataSet *set, vtkIdType *idMap);
00157 vtkIdType AddNewCellsDataSet(vtkDataSet *set, vtkIdType *idMap);
00158
00159 vtkIdType GlobalCellIdAccessGetId(vtkIdType idx);
00160 int GlobalCellIdAccessStart(vtkDataSet *set);
00161 vtkIdType GlobalNodeIdAccessGetId(vtkIdType idx);
00162 int GlobalNodeIdAccessStart(vtkDataSet *set);
00163
00164 int TotalNumberOfDataSets;
00165
00166 vtkIdType TotalNumberOfCells;
00167 vtkIdType TotalNumberOfPoints;
00168
00169 vtkIdType NumberOfCells;
00170 vtkIdType NumberOfPoints;
00171
00172 char *GlobalIdArrayName;
00173
00174 vtkIdType *GlobalIdArrayIdType;
00175 long *GlobalIdArrayLong;
00176 int *GlobalIdArrayInt;
00177 short *GlobalIdArrayShort;
00178 char *GlobalIdArrayChar;
00179
00180 char *GlobalCellIdArrayName;
00181
00182 vtkIdType *GlobalCellIdArrayIdType;
00183 long *GlobalCellIdArrayLong;
00184 int *GlobalCellIdArrayInt;
00185 short *GlobalCellIdArrayShort;
00186 char *GlobalCellIdArrayChar;
00187
00188 float PointMergeTolerance;
00189 int MergeDuplicatePoints;
00190
00191 char InputIsUGrid;
00192 char InputIsPointSet;
00193
00194 vtkMergeCellsSTLCloak *GlobalIdMap;
00195 vtkMergeCellsSTLCloak *GlobalCellIdMap;
00196
00197
00198 vtkDataSetAttributes::FieldList *ptList;
00199 vtkDataSetAttributes::FieldList *cellList;
00200
00201
00202 vtkUnstructuredGrid *UnstructuredGrid;
00203
00204 int nextGrid;
00205
00206 vtkMergeCells(const vtkMergeCells&);
00207 void operator=(const vtkMergeCells&);
00208 };
00209 #endif