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
23class vtkLine;
24class vtkHexahedron;
25class vtkQuad;
26class vtkTetra;
27class vtkTriangle;
28class vtkVoxel;
29class 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.
36namespace vtkToDax
37{
38template<typename T> struct CellTypeToType;
39template<> struct CellTypeToType<vtkLine>
40{
42 enum {NUM_POINTS=2};
43 typedef dax::CellTagLine DaxCellType;
44};
45
46template<> struct CellTypeToType<vtkHexahedron>
47{
49 enum {NUM_POINTS=8};
50 typedef dax::CellTagHexahedron DaxCellType;
51};
52
53template<> struct CellTypeToType<vtkQuad>
54{
56 enum {NUM_POINTS=4};
57 typedef dax::CellTagQuadrilateral DaxCellType;
58};
59
60
61template<> struct CellTypeToType<vtkTetra>
62{
64 enum {NUM_POINTS=4};
65 typedef dax::CellTagTetrahedron DaxCellType;
66};
67
68template<> struct CellTypeToType<vtkTriangle>
69{
71 enum {NUM_POINTS=3};
72 typedef dax::CellTagTriangle DaxCellType;
73};
74
75template<> struct CellTypeToType<vtkVoxel>
76{
78 enum {NUM_POINTS=8};
79 typedef dax::CellTagVoxel DaxCellType;
80};
81
82template<> struct CellTypeToType<vtkVertex>
83{
85 enum {NUM_POINTS=1};
86 typedef dax::CellTagVertex DaxCellType;
87};
88
89template<> 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 linear 3D hexahedron
Definition: vtkHexahedron.h:48
cell represents a 1D line
Definition: vtkLine.h:36
a cell that represents a 2D quadrilateral
Definition: vtkQuad.h:42
a 3D cell that represents a tetrahedron
Definition: vtkTetra.h:48
a cell that represents a triangle
Definition: vtkTriangle.h:42
a cell that represents a 3D point
Definition: vtkVertex.h:37
a cell that represents a 3D orthogonal parallelepiped
Definition: vtkVoxel.h:45
a 3D cell that represents a linear wedge
Definition: vtkWedge.h:50
dax::CellTagQuadrilateral DaxCellType
dax::CellTagTetrahedron DaxCellType
VTKCellType
Definition: vtkCellType.h:43
@ VTK_VOXEL
Definition: vtkCellType.h:56
@ VTK_TRIANGLE
Definition: vtkCellType.h:50
@ VTK_TETRA
Definition: vtkCellType.h:55
@ VTK_LINE
Definition: vtkCellType.h:48
@ VTK_WEDGE
Definition: vtkCellType.h:58
@ VTK_HEXAHEDRON
Definition: vtkCellType.h:57
@ VTK_QUAD
Definition: vtkCellType.h:54
@ VTK_VERTEX
Definition: vtkCellType.h:46