Loading [MathJax]/extensions/tex2jax.js
Tatooine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages Concepts
cell_type.h
Go to the documentation of this file.
1#ifndef TATOOINE_VTK_CELL_TYPE_H
2#define TATOOINE_VTK_CELL_TYPE_H
3//==============================================================================
4#include <string>
5//==============================================================================
6namespace tatooine::vtk {
7//==============================================================================
8enum class cell_type : std::uint8_t {
9 vertex = 1,
10 poly_vertex = 2,
11 line = 3,
12 poly_line = 4,
13 triangle = 5,
15 polygon = 7,
16 pixel = 8,
17 quad = 9,
18 tetra = 10,
19 voxel = 11,
20 hexahedron = 12,
21 wedge = 13,
22 pyramid = 14,
24};
25//-----------------------------------------------------------------------------
26constexpr auto to_string_view(cell_type const ct) -> std::string_view {
27 switch (ct) {
29 return "VERTEX";
31 return "POLY_VERTEX";
32 case cell_type::line:
33 return "LINE";
35 return "POLY_LINE";
37 return "TRIANGLE";
39 return "TRIANGLE_STRIP";
41 return "POLYGON";
43 return "PIXEL";
44 case cell_type::quad:
45 return "QUAD";
47 return "TETRA";
49 return "VOXEL";
51 return "HEXAHEDRON";
53 return "WEDGE";
55 return "PYRAMID";
56 default:
58 return "UNKNOWN";
59 }
60}
61//-----------------------------------------------------------------------------
62auto parse_cell_type(std::string const &) -> cell_type;
63//==============================================================================
64} // namespace tatooine::vtk
65//==============================================================================
66#endif
Definition: cell_type.h:6
auto parse_cell_type(std::string const &) -> cell_type
constexpr auto to_string_view(cell_type const ct) -> std::string_view
Definition: cell_type.h:26
cell_type
Definition: cell_type.h:8
Definition: line.h:35