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
VTK_VOXEL
@ VTK_VOXEL
Definition: vtkCellType.h:56
vtkToDax::CellTypeToType< vtkTriangle >::DaxCellType
dax::CellTagTriangle DaxCellType
Definition: CellTypeToType.h:72
vtkHexahedron
a cell that represents a linear 3D hexahedron
Definition: vtkHexahedron.h:48
vtkToDax::CellTypeToType< vtkHexahedron >::DaxCellType
dax::CellTagHexahedron DaxCellType
Definition: CellTypeToType.h:50
VTK_LINE
@ VTK_LINE
Definition: vtkCellType.h:48
vtkToDax::CellTypeToType< vtkVoxel >::DaxCellType
dax::CellTagVoxel DaxCellType
Definition: CellTypeToType.h:79
vtkToDax::CellTypeToType< vtkVertex >::DaxCellType
dax::CellTagVertex DaxCellType
Definition: CellTypeToType.h:86
vtkVertex
a cell that represents a 3D point
Definition: vtkVertex.h:37
vtkLine
cell represents a 1D line
Definition: vtkLine.h:36
VTK_QUAD
@ VTK_QUAD
Definition: vtkCellType.h:54
vtkToDax::CellTypeToType< vtkTetra >::DaxCellType
dax::CellTagTetrahedron DaxCellType
Definition: CellTypeToType.h:65
vtkWedge
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:50
vtkToDax::CellTypeToType< vtkLine >::DaxCellType
dax::CellTagLine DaxCellType
Definition: CellTypeToType.h:43
vtkToDax::CellTypeToType< vtkQuad >::DaxCellType
dax::CellTagQuadrilateral DaxCellType
Definition: CellTypeToType.h:57
vtkCellType.h
VTK_HEXAHEDRON
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:57
VTK_TETRA
@ VTK_TETRA
Definition: vtkCellType.h:55
vtkToDax::CellTypeToType< vtkWedge >::DaxCellType
dax::CellTagWedge DaxCellType
Definition: CellTypeToType.h:93
vtkTriangle
a cell that represents a triangle
Definition: vtkTriangle.h:42
vtkToDax::CellTypeToType
Definition: CellTypeToType.h:38
VTK_WEDGE
@ VTK_WEDGE
Definition: vtkCellType.h:58
VTKCellType
VTKCellType
Definition: vtkCellType.h:43
vtkTetra
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
vtkToDax
Definition: Allocators.h:36
VTK_VERTEX
@ VTK_VERTEX
Definition: vtkCellType.h:46
VTK_TRIANGLE
@ VTK_TRIANGLE
Definition: vtkCellType.h:50
vtkQuad
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:42
vtkVoxel
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:45