Commit 6ca49720 by Philipp Adolf

Set sharpness of neighbors

parent cafe17aa
......@@ -731,6 +731,21 @@ void Subdivision::splitRegular(Mesh *mesh) {
QMap<Triangle, Triangle::Neighbors> neighbors;
buildNeighborsMap(current_mesh->buffers[0]->vertices, all_triangles, neighbors);
for(Triangle t : all_triangles){
if (t.get_sharpness_uv() > 0){
Triangle::Neighbor tn = neighbors[t].uv;
tn.triangle->set_sharpness(tn.edge.name,t.get_sharpness_uv());
}
if (t.get_sharpness_vw() > 0){
Triangle::Neighbor tn = neighbors[t].vw;
tn.triangle->set_sharpness(tn.edge.name,t.get_sharpness_vw());
}
if (t.get_sharpness_wu() > 0){
Triangle::Neighbor tn = neighbors[t].wu;
tn.triangle->set_sharpness(tn.edge.name,t.get_sharpness_wu());
}
}
QVector<Triangle> regular;
QVector<Triangle> irregular;
findRegular(all_triangles, neighbors, regular, irregular);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment