-
Notifications
You must be signed in to change notification settings - Fork 1
/
h2meshconstructor.h
77 lines (60 loc) · 2.39 KB
/
h2meshconstructor.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef H2MESHCONSTRUCTOR_H
#define H2MESHCONSTRUCTOR_H
#include "tools.h"
#include "h2mesh.h"
#include "h2polygontriangulater.h"
class H2MeshConstructor
{
friend H2Mesh::H2Mesh(const GroupRepresentation<H2Isometry> &, uint);
public:
H2MeshConstructor() = delete;
H2MeshConstructor(const H2MeshConstructor &) = delete;
H2MeshConstructor & operator=(H2MeshConstructor) = delete;
private:
explicit H2MeshConstructor(H2Mesh *mesh);
void createPoints();
void createNeighbors();
void createSubdivisions();
void createRegularPoints();
void createCutPoints();
void createBoundaryPoints();
void createVertexAndSteinerPoints();
void createInteriorNeighbors();
void createCutNeighbors();
void createSideNeighbors();
void createRemainingNonExteriorNeighbors();
void createExteriorNeighbors();
void createExteriorVertexNeighbors();
void createMeshExteriorIndices();
void reorganizeNeighbors();
void createWeightsCentroid();
void createWeightsCentroidNaive();
void createWeightsEnergy();
bool runTests() const;
bool checkNumberOfMeshPoints() const;
bool checkForDuplicateNeighbors() const;
bool checkNumberOfNeighbors() const;
bool checkPartnerPoints() const;
bool checkCurrentIndex() const;
std::vector<uint> meshPointsIndicesAlongSide(uint side) const;
std::vector<uint> meshPointsIndicesAlongFullSide(uint side) const;
static bool compareTriples(const std::tuple<H2Point, H2Point, uint> & t1, const std::tuple<H2Point, H2Point, uint> & t2);
H2Mesh *mesh;
uint depth;
std::vector< TriangularSubdivision<H2Point> > *subdivisions;
std::vector<std::vector<uint>> *meshIndicesInSubdivisions;
std::vector<H2MeshPoint*> *points;
std::vector<H2MeshPoint> *regularPoints;
std::vector<H2MeshCutPoint> *cutPoints;
std::vector<H2MeshBoundaryPoint> *boundaryPoints;
std::vector<H2MeshVertexPoint> *vertexPoints;
std::vector<H2MeshSteinerPoint> *steinerPoints;
H2PolygonTriangulater triangulater;
uint nbVertices, nbSteinerPoints, nbSubdivisions, nbSubdivisionLines, nbSubdivisionPoints;
uint nextIndex;
std::vector< std::vector<bool> > boundaryPointInSubdivisions;
std::vector<uint> vertexMeshIndex, steinerPointsMeshIndex;
std::vector< std::vector< std::vector<uint> > > neighborsInSubdivisions;
std::vector<Word> sidePairings;
};
#endif // H2MESHCONSTRUCTOR_H