forked from TUM-I5/PUML2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Numbering.h
55 lines (43 loc) · 969 Bytes
/
Numbering.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/**
* @file
* This file is part of PUML
*
* For conditions of distribution and use, please see the copyright
* notice in the file 'COPYING' at the root directory of this package
* and the copyright notice at https://github.com/TUM-I5/PUMGen
*
* @copyright 2017 Technische Universitaet Muenchen
* @author Sebastian Rettenberger <[email protected]>
*/
#ifndef PUML_NUMBERING_H
#define PUML_NUMBERING_H
#include "Topology.h"
namespace PUML
{
namespace internal
{
template<TopoType Topo>
class Numbering
{
public:
typedef unsigned int face_t[Topology<Topo>::facevertices()];
static const face_t* facevertices();
};
template<>
class Numbering<TETRAHEDRON>
{
public:
typedef unsigned int face_t[Topology<TETRAHEDRON>::facevertices()];
static const face_t* facevertices()
{
static const face_t vertices[4] = {
{ 1, 0, 2 },
{ 0, 1, 3 },
{ 1, 2, 3 },
{ 2, 0, 3 } };
return vertices;
}
};
}
}
#endif // PUML_NUMBERING_H