-
Notifications
You must be signed in to change notification settings - Fork 0
/
CustomSchemeSubdivisionStrategy.h
48 lines (39 loc) · 1.81 KB
/
CustomSchemeSubdivisionStrategy.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
#ifndef CUSTOMSCHEMESUBDIVISIONSTRATEGY_H
#define CUSTOMSCHEMESUBDIVISIONSTRATEGY_H
#include "SubdivisionStrategy.h"
#include "CustomScheme.h"
#include "mesh.h"
#include "MeshWalkHandler.h"
#include "WeightArrayGenerator.h"
#include "DebugHelper.h"
class CustomSchemeSubdivisionStrategy : public SubdivisionStrategy
{
public:
CustomSchemeSubdivisionStrategy(CustomScheme custom_scheme):
custom_scheme(custom_scheme) {}
Mesh doSubdivision(Mesh evenMesh);
void setCustomScheme(CustomScheme custom_scheme);
private:
CustomScheme custom_scheme;
Mesh::Vertex calculateNewEdgeVert(Polyhedron::Halfedge_iterator halfedge);
Mesh::Vertex calculateNewFaceVert(Polyhedron::Facet_iterator facet);
Mesh::Vertex calculateNewEvenVert(Polyhedron::Vertex_iterator vertex);
void calculateFacesTri(
QVector<Mesh::Vertex>& vertices,
QVector<int>& face_indicies,
std::map<Polyhedron::Halfedge_iterator, Mesh::Vertex>& new_edge_vertices,
std::map<Polyhedron::Vertex_iterator, Mesh::Vertex>& new_even_vertices,
Polyhedron::Facet_iterator it,
std::map<Polyhedron::Halfedge_iterator, int>& edge_map,
std::map<Polyhedron::Vertex_iterator, int>& even_map);
void calculateFacesQuad(
QVector<Mesh::Vertex>& vertices,
QVector<int>& face_indicies,
std::map<Polyhedron::Halfedge_iterator, Mesh::Vertex>& new_edge_vertices,
std::map<Polyhedron::Facet_iterator, Mesh::Vertex>& new_face_vertices,
std::map<Polyhedron::Vertex_iterator, Mesh::Vertex>& new_even_vertices,
Polyhedron::Facet_iterator it,
std::map<Polyhedron::Halfedge_iterator, int>& edge_map,
std::map<Polyhedron::Vertex_iterator, int>& even_map);
};
#endif // CUSTOMSCHEMESUBDIVISIONSTRATEGY_H