-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMesh.h
More file actions
30 lines (24 loc) · 787 Bytes
/
Mesh.h
File metadata and controls
30 lines (24 loc) · 787 Bytes
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
//
// Created by bpiranda on 22/11/2019.
//
#ifndef GEOMETRY_TRIANGULATION_GL_MESH_H
#define GEOMETRY_TRIANGULATION_GL_MESH_H
#include <vector>
#include "Triangle.h"
class Mesh {
public:
vector<Vector2D> vertices;
vector<Triangle> triangles;
Mesh(vector<Vector2D> &p_vert);
Mesh(const float p_vert[][2], int p_nvert,const int p_tri[][3],int p_ntri);
void draw();
void onMouseMove(double x,double y);
bool checkDelaunay();
const Triangle *getTriangle(const Vector2D &pt) const;
Triangle *neighborInside(const Triangle *T);
Triangle *findTriangle(const Vector2D *P1,const Vector2D *P2);
void flip(Triangle &ptr1,Triangle &ptr2);
void solveDelaunay();
void subdivide(const Vector2D &P);
};
#endif //GEOMETRY_TRIANGULATION_GL_MESH_H