Mesh_analyzer
Loading...
Searching...
No Matches
triangle.h
1#include <vector>
2#include <array>
3#include <iostream>
4#include <cmath>
5#include <unordered_set>
6#include <unordered_map>
7#include <fstream>
8#include <sstream>
9#include <string>
10
11
12#include "geometry/point.h"
13#include "geometry/edge.h"
14
19struct Triangle {
20
21 std::array<int, 3> v;
22 bool isBad = false;
23
24
30 bool containsEdge(int v1, int v2) const;
31
32
39 bool containsPoint(const std::vector<Point>& vertices, const Point& P);
40
41};
A struct representing a point in 3D space.
Definition point.h:12
A struct representing a triangle in the mesh.
Definition triangle.h:19
std::array< int, 3 > v
Indices of the vertices that form the triangle.
Definition triangle.h:21
bool isBad
Flag used in Delaunay triangulation to mark triangles that need to be removed.
Definition triangle.h:22
bool containsPoint(const std::vector< Point > &vertices, const Point &P)
Check if the circum circle of the triangle contains a specific point.
Definition triangle.cpp:11
bool containsEdge(int v1, int v2) const
Check if the triangle contains a specific edge defined by two vertex indices.
Definition triangle.cpp:4