1 //============================================================================= 2 // 3 // Copyright (c) Kitware, Inc. 4 // All rights reserved. 5 // See LICENSE.txt for details. 6 // 7 // This software is distributed WITHOUT ANY WARRANTY; without even 8 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 9 // PURPOSE. See the above copyright notice for more information. 10 // 11 // Copyright 2012 Sandia Corporation. 12 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, 13 // the U.S. Government retains certain rights in this software. 14 // 15 //============================================================================= 16 17 #ifndef vtkToDax_CellTypeToType_h 18 #define vtkToDax_CellTypeToType_h 19 20 #include "vtkCellType.h" 21 22 23 class vtkLine; 24 class vtkHexahedron; 25 class vtkQuad; 26 class vtkTetra; 27 class vtkTriangle; 28 class vtkVoxel; 29 class vtkWedge; 30 31 #include <dax/CellTag.h> 32 33 //ToDo the output type needs to be moved to a separate header that 34 //is per algorithm output type, that maps the input cell type to the output 35 //cell type. 36 namespace vtkToDax 37 { 38 template<typename T> struct CellTypeToType; 39 template<> struct CellTypeToType<vtkLine> 40 { 41 enum {VTKCellType=VTK_LINE}; 42 enum {NUM_POINTS=2}; 43 typedef dax::CellTagLine DaxCellType; 44 }; 45 46 template<> struct CellTypeToType<vtkHexahedron> 47 { 48 enum {VTKCellType=VTK_HEXAHEDRON}; 49 enum {NUM_POINTS=8}; 50 typedef dax::CellTagHexahedron DaxCellType; 51 }; 52 53 template<> struct CellTypeToType<vtkQuad> 54 { 55 enum {VTKCellType=VTK_QUAD}; 56 enum {NUM_POINTS=4}; 57 typedef dax::CellTagQuadrilateral DaxCellType; 58 }; 59 60 61 template<> struct CellTypeToType<vtkTetra> 62 { 63 enum {VTKCellType=VTK_TETRA}; 64 enum {NUM_POINTS=4}; 65 typedef dax::CellTagTetrahedron DaxCellType; 66 }; 67 68 template<> struct CellTypeToType<vtkTriangle> 69 { 70 enum {VTKCellType=VTK_TRIANGLE}; 71 enum {NUM_POINTS=3}; 72 typedef dax::CellTagTriangle DaxCellType; 73 }; 74 75 template<> struct CellTypeToType<vtkVoxel> 76 { 77 enum {VTKCellType=VTK_VOXEL}; 78 enum {NUM_POINTS=8}; 79 typedef dax::CellTagVoxel DaxCellType; 80 }; 81 82 template<> struct CellTypeToType<vtkVertex> 83 { 84 enum {VTKCellType=VTK_VERTEX}; 85 enum {NUM_POINTS=1}; 86 typedef dax::CellTagVertex DaxCellType; 87 }; 88 89 template<> struct CellTypeToType<vtkWedge> 90 { 91 enum {VTKCellType=VTK_WEDGE}; 92 enum {NUM_POINTS=6}; 93 typedef dax::CellTagWedge DaxCellType; 94 }; 95 } 96 97 98 #endif // vtkToDax_CellTypeToType_h 99