10 #ifndef vtk_m_rendering_Cylinderizer_h
11 #define vtk_m_rendering_Cylinderizer_h
26 #define TRI_PER_CSS 12
94 #if defined(VTKM_MSVC)
96 #pragma warning(disable : 4127) //conditional expression is constant
98 template <
typename CellNodeVecType,
typename OutIndicesPortal>
102 const CellNodeVecType& cellIndices,
103 OutIndicesPortal& outputIndices)
const
108 outputIndices.Set(offset, segment);
112 outputIndices.Set(offset + 1, segment);
116 outputIndices.Set(offset + 2, segment);
118 template <
typename CellNodeVecType,
typename OutIndicesPortal>
121 OutIndicesPortal& outputIndices)
const
131 segment[0] = cellIndex;
136 cell2seg(idx, segment, offset, cellIndices, outputIndices);
141 cell2seg(idx, segment, offset, cellIndices, outputIndices);
146 cell2seg(idx, segment, offset, cellIndices, outputIndices);
151 cell2seg(idx, segment, offset, cellIndices, outputIndices);
156 cell2seg(idx, segment, offset, cellIndices, outputIndices);
161 cell2seg(idx, segment, offset, cellIndices, outputIndices);
166 cell2seg(idx, segment, offset, cellIndices, outputIndices);
171 cell2seg(idx, segment, offset, cellIndices, outputIndices);
176 cell2seg(idx, segment, offset, cellIndices, outputIndices);
181 cell2seg(idx, segment, offset, cellIndices, outputIndices);
186 cell2seg(idx, segment, offset, cellIndices, outputIndices);
191 cell2seg(idx, segment, offset, cellIndices, outputIndices);
194 #if defined(VTKM_MSVC)
209 template <
typename VecType,
typename OutputPortal>
211 const VecType& cellIndices,
216 OutputPortal& outputIndices)
const
222 outputIndices.Set(offset++, segment);
226 outputIndices.Set(offset++, segment);
230 outputIndices.Set(offset++, segment);
234 template <
typename VecType,
typename OutputPortal>
236 vtkm::CellShapeTagQuad shapeType,
237 const VecType& cellIndices,
239 OutputPortal& outputIndices)
const
245 segment[1] = cellIndices[0];
246 segment[2] = cellIndices[1];
247 outputIndices.Set(offset, segment);
249 segment[1] = cellIndices[1];
250 segment[2] = cellIndices[2];
251 outputIndices.Set(offset + 1, segment);
253 segment[1] = cellIndices[2];
254 segment[2] = cellIndices[3];
255 outputIndices.Set(offset + 2, segment);
257 segment[1] = cellIndices[3];
258 segment[2] = cellIndices[0];
259 outputIndices.Set(offset + 3, segment);
263 template <
typename VecType,
typename OutputPortal>
265 vtkm::CellShapeTagHexahedron
vtkmNotUsed(shapeType),
266 const VecType& cellIndices,
268 OutputPortal& outputIndices)
const
272 tri2seg(offset, cellIndices, cellId, 0, 1, 5, outputIndices);
273 tri2seg(offset, cellIndices, cellId, 0, 5, 4, outputIndices);
274 tri2seg(offset, cellIndices, cellId, 1, 2, 6, outputIndices);
275 tri2seg(offset, cellIndices, cellId, 1, 6, 5, outputIndices);
276 tri2seg(offset, cellIndices, cellId, 3, 7, 6, outputIndices);
277 tri2seg(offset, cellIndices, cellId, 3, 6, 2, outputIndices);
278 tri2seg(offset, cellIndices, cellId, 0, 4, 7, outputIndices);
279 tri2seg(offset, cellIndices, cellId, 0, 7, 3, outputIndices);
280 tri2seg(offset, cellIndices, cellId, 0, 3, 2, outputIndices);
281 tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
282 tri2seg(offset, cellIndices, cellId, 4, 5, 6, outputIndices);
283 tri2seg(offset, cellIndices, cellId, 4, 6, 7, outputIndices);
285 template <
typename VecType,
typename OutputPortal>
288 const VecType& cellIndices,
290 OutputPortal& outputIndices)
const
294 tri2seg(offset, cellIndices, cellId, 0, 1, 2, outputIndices);
295 tri2seg(offset, cellIndices, cellId, 3, 5, 4, outputIndices);
296 tri2seg(offset, cellIndices, cellId, 3, 0, 2, outputIndices);
297 tri2seg(offset, cellIndices, cellId, 3, 2, 5, outputIndices);
298 tri2seg(offset, cellIndices, cellId, 1, 4, 5, outputIndices);
299 tri2seg(offset, cellIndices, cellId, 1, 5, 2, outputIndices);
300 tri2seg(offset, cellIndices, cellId, 0, 3, 4, outputIndices);
301 tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
303 template <
typename VecType,
typename OutputPortal>
306 const VecType& cellIndices,
308 OutputPortal& outputIndices)
const
316 segment[1] = cellIndices[0];
317 segment[2] = cellIndices[1];
318 outputIndices.Set(pointOffset, segment);
324 segment[1] = cellIndices[0];
325 segment[2] = cellIndices[1];
326 outputIndices.Set(pointOffset, segment);
328 segment[1] = cellIndices[1];
329 segment[2] = cellIndices[2];
330 outputIndices.Set(pointOffset + 1, segment);
332 segment[1] = cellIndices[2];
333 segment[2] = cellIndices[0];
334 outputIndices.Set(pointOffset + 2, segment);
340 segment[1] = cellIndices[0];
341 segment[2] = cellIndices[1];
342 outputIndices.Set(pointOffset, segment);
344 segment[1] = cellIndices[1];
345 segment[2] = cellIndices[2];
346 outputIndices.Set(pointOffset + 1, segment);
348 segment[1] = cellIndices[2];
349 segment[2] = cellIndices[3];
350 outputIndices.Set(pointOffset + 2, segment);
352 segment[1] = cellIndices[3];
353 segment[2] = cellIndices[0];
354 outputIndices.Set(pointOffset + 3, segment);
359 tri2seg(offset, cellIndices, cellId, 0, 3, 1, outputIndices);
360 tri2seg(offset, cellIndices, cellId, 1, 2, 3, outputIndices);
361 tri2seg(offset, cellIndices, cellId, 0, 2, 3, outputIndices);
362 tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
367 tri2seg(offset, cellIndices, cellId, 0, 1, 5, outputIndices);
368 tri2seg(offset, cellIndices, cellId, 0, 5, 4, outputIndices);
369 tri2seg(offset, cellIndices, cellId, 1, 2, 6, outputIndices);
370 tri2seg(offset, cellIndices, cellId, 1, 6, 5, outputIndices);
371 tri2seg(offset, cellIndices, cellId, 3, 7, 6, outputIndices);
372 tri2seg(offset, cellIndices, cellId, 3, 6, 2, outputIndices);
373 tri2seg(offset, cellIndices, cellId, 0, 4, 7, outputIndices);
374 tri2seg(offset, cellIndices, cellId, 0, 7, 3, outputIndices);
375 tri2seg(offset, cellIndices, cellId, 0, 3, 2, outputIndices);
376 tri2seg(offset, cellIndices, cellId, 0, 2, 1, outputIndices);
377 tri2seg(offset, cellIndices, cellId, 4, 5, 6, outputIndices);
378 tri2seg(offset, cellIndices, cellId, 4, 6, 7, outputIndices);
383 tri2seg(offset, cellIndices, cellId, 0, 1, 2, outputIndices);
384 tri2seg(offset, cellIndices, cellId, 3, 5, 4, outputIndices);
385 tri2seg(offset, cellIndices, cellId, 3, 0, 2, outputIndices);
386 tri2seg(offset, cellIndices, cellId, 3, 2, 5, outputIndices);
387 tri2seg(offset, cellIndices, cellId, 1, 4, 5, outputIndices);
388 tri2seg(offset, cellIndices, cellId, 1, 5, 2, outputIndices);
389 tri2seg(offset, cellIndices, cellId, 0, 3, 4, outputIndices);
390 tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
396 tri2seg(offset, cellIndices, cellId, 0, 4, 1, outputIndices);
397 tri2seg(offset, cellIndices, cellId, 1, 2, 4, outputIndices);
398 tri2seg(offset, cellIndices, cellId, 2, 3, 4, outputIndices);
399 tri2seg(offset, cellIndices, cellId, 0, 4, 3, outputIndices);
400 tri2seg(offset, cellIndices, cellId, 3, 2, 1, outputIndices);
401 tri2seg(offset, cellIndices, cellId, 3, 1, 0, outputIndices);
426 segInvoker.Invoke(cellSetStructured3D, cellIdxs, outputIndices);
432 auto cellSetUnstructured =
437 countInvoker.Invoke(cellSetUnstructured, segmentsPerCell);
447 cylInvoker.Invoke(cellSetUnstructured, cellOffsets, outputIndices);