10 #ifndef vtk_m_io_internal_VTKDataSetCells_h
11 #define vtk_m_io_internal_VTKDataSetCells_h
29 enum UnsupportedVTKCells
31 CELL_SHAPE_POLY_VERTEX = 2,
33 CELL_SHAPE_TRIANGLE_STRIP = 6,
43 std::vector<vtkm::Id> newConnectivity;
44 std::vector<vtkm::IdComponent> newNumIndices;
45 std::vector<vtkm::UInt8> newShapes;
46 std::vector<vtkm::Id> permutationVec;
67 newShapes.push_back(shape);
68 newNumIndices.push_back(numInds);
71 newConnectivity.push_back(connPortal.Get(connIdx++));
73 permutationVec.push_back(i);
84 else if (numVerts == 4)
88 newShapes.push_back(newShape);
89 newNumIndices.push_back(numVerts);
92 newConnectivity.push_back(connPortal.Get(connIdx++));
94 permutationVec.push_back(i);
97 case CELL_SHAPE_POLY_VERTEX:
103 newNumIndices.push_back(1);
104 newConnectivity.push_back(connPortal.Get(connIdx));
105 permutationVec.push_back(i);
116 newNumIndices.push_back(2);
117 newConnectivity.push_back(connPortal.Get(connIdx));
118 newConnectivity.push_back(connPortal.Get(connIdx + 1));
119 permutationVec.push_back(i);
125 case CELL_SHAPE_TRIANGLE_STRIP:
131 newNumIndices.push_back(3);
134 newConnectivity.push_back(connPortal.Get(connIdx));
135 newConnectivity.push_back(connPortal.Get(connIdx + 1));
136 newConnectivity.push_back(connPortal.Get(connIdx + 2));
140 newConnectivity.push_back(connPortal.Get(connIdx + 2));
141 newConnectivity.push_back(connPortal.Get(connIdx + 1));
142 newConnectivity.push_back(connPortal.Get(connIdx));
144 permutationVec.push_back(i);
150 case CELL_SHAPE_PIXEL:
153 newNumIndices.push_back(numInds);
154 newConnectivity.push_back(connPortal.Get(connIdx + 0));
155 newConnectivity.push_back(connPortal.Get(connIdx + 1));
156 newConnectivity.push_back(connPortal.Get(connIdx + 3));
157 newConnectivity.push_back(connPortal.Get(connIdx + 2));
158 permutationVec.push_back(i);
162 case CELL_SHAPE_VOXEL:
165 newNumIndices.push_back(numInds);
166 newConnectivity.push_back(connPortal.Get(connIdx + 0));
167 newConnectivity.push_back(connPortal.Get(connIdx + 1));
168 newConnectivity.push_back(connPortal.Get(connIdx + 3));
169 newConnectivity.push_back(connPortal.Get(connIdx + 2));
170 newConnectivity.push_back(connPortal.Get(connIdx + 4));
171 newConnectivity.push_back(connPortal.Get(connIdx + 5));
172 newConnectivity.push_back(connPortal.Get(connIdx + 7));
173 newConnectivity.push_back(connPortal.Get(connIdx + 6));
174 permutationVec.push_back(i);
187 permutationVec.clear();
192 std::copy(permutationVec.begin(),
193 permutationVec.end(),
198 std::copy(newShapes.begin(),
202 std::copy(newNumIndices.begin(),
206 std::copy(newConnectivity.begin(),
207 newConnectivity.end(),
226 if (shapesPortal.Get(i) != shape0)
236 #endif // vtk_m_io_internal_VTKDataSetCells_h