VTK
CellTypeToType.h
Go to the documentation of this file.
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 {
42  enum {NUM_POINTS=2};
43  typedef dax::CellTagLine DaxCellType;
44 };
45 
46 template<> struct CellTypeToType<vtkHexahedron>
47 {
49  enum {NUM_POINTS=8};
50  typedef dax::CellTagHexahedron DaxCellType;
51 };
52 
53 template<> struct CellTypeToType<vtkQuad>
54 {
56  enum {NUM_POINTS=4};
57  typedef dax::CellTagQuadrilateral DaxCellType;
58 };
59 
60 
61 template<> struct CellTypeToType<vtkTetra>
62 {
64  enum {NUM_POINTS=4};
65  typedef dax::CellTagTetrahedron DaxCellType;
66 };
67 
68 template<> struct CellTypeToType<vtkTriangle>
69 {
71  enum {NUM_POINTS=3};
72  typedef dax::CellTagTriangle DaxCellType;
73 };
74 
75 template<> struct CellTypeToType<vtkVoxel>
76 {
78  enum {NUM_POINTS=8};
79  typedef dax::CellTagVoxel DaxCellType;
80 };
81 
82 template<> struct CellTypeToType<vtkVertex>
83 {
85  enum {NUM_POINTS=1};
86  typedef dax::CellTagVertex DaxCellType;
87 };
88 
89 template<> struct CellTypeToType<vtkWedge>
90 {
92  enum {NUM_POINTS=6};
93  typedef dax::CellTagWedge DaxCellType;
94 };
95 }
96 
97 
98 #endif // vtkToDax_CellTypeToType_h
a cell that represents a 3D point
Definition: vtkVertex.h:36
dax::CellTagTetrahedron DaxCellType
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:41
VTKCellType
Definition: vtkCellType.h:43
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:47
cell represents a 1D line
Definition: vtkLine.h:35
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:44
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:47
a cell that represents a triangle
Definition: vtkTriangle.h:41
dax::CellTagQuadrilateral DaxCellType
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:49