Enmesh
Loading...
Searching...
No Matches
tetrahedron.h
1#ifndef TETRAHEDRON_H
2#define TETRAHEDRON_H
3
4#include <vector>
5#include <array>
6#include <iostream>
7#include <cmath>
8#include <unordered_set>
9#include <unordered_map>
10#include <fstream>
11#include <sstream>
12#include <string>
13
14
15#include "geometry/point.h"
16#include "geometry/edge.h"
17
18
19namespace Enmesh {
20
22
23 static constexpr size_t elementType = 4;
24 static constexpr size_t numVertices = 4;
25
26 std::array<size_t, 4> v;
27 bool isBad = false;
28
29
36 bool containsPoint(const std::vector<Point>& vertices, const Point& point);
37
38
44 bool containsEdge(int v1, int v2) const;
45};
46
47} // namespace Enmesh
48
49#endif
A struct representing a point in 3D space.
Definition point.h:15
Definition tetrahedron.h:21
std::array< size_t, 4 > v
Indices of the vertices that form the tetrahedron.
Definition tetrahedron.h:26
bool isBad
Flag used in Delaunay triangulation to mark tetrahedra that need to be removed.
Definition tetrahedron.h:27
bool containsPoint(const std::vector< Point > &vertices, const Point &point)
Check if the circumsphere of the tetrahedron contains a specific point.
Definition tetrahedron.cpp:5
bool containsEdge(int v1, int v2) const
Check if the circumsphere of the tetrahedron contains a specific edge defined by two vertex indices.
Definition tetrahedron.cpp:39
static constexpr size_t elementType
Gmsh element type for tetrahedra.
Definition tetrahedron.h:23
static constexpr size_t numVertices
Number of vertices in a tetrahedron.
Definition tetrahedron.h:24