Mesh_analyzer
Loading...
Searching...
No Matches
triangulation.h
1#ifndef TRIANGULATION_H
2#define TRIANGULATION_H
3
4#include <algorithm>
5#include <iostream>
6#include <string_view>
7
8#include "geometry/mesh.h"
9#include "mesh_generation/basic_shapes.h"
10
11
15class Delaunay {
16
17public:
18 Mesh mesh;
19
20
26
27
32 void addPoint(const Point& point);
33
34
39 void cleanup(Triangle superTriangle);
40
41
46 std::vector<Triangle> triangulate();
47
48};
49
50#endif
Class for performing Delaunay triangulation.
Definition triangulation.h:15
Triangle createSuperTriangle()
Create a super-triangle that encompasses all vertices in the mesh.
Definition triangulation.cpp:4
void cleanup(Triangle superTriangle)
Clean up the mesh by removing triangles that include the vertices of the super-triangle.
Definition triangulation.cpp:92
void addPoint(const Point &point)
Add a point to the triangulation and update the mesh accordingly.
Definition triangulation.cpp:41
std::vector< Triangle > triangulate()
Perform Delaunay triangulation on the current set of vertices in the mesh.
Definition triangulation.cpp:114
A class representing a 3D mesh.
Definition mesh.h:25
A struct representing a point in 3D space.
Definition point.h:12
A struct representing a triangle in the mesh.
Definition triangle.h:19