Commit cafe17aa by Philipp Adolf

Use sharpness information when building triangles

This reverts commit 997c0ac1e92033f93be3e3d280e8f00dc41b18b5.
parent 7a757ec4
......@@ -95,7 +95,7 @@ void Subdivision::subdivide(Mesh *mesh, int level) {
Result result = runShader(input, tables);
QVector<Triangle> triangles;
regularIbToTriangles(&result.vertex_buffer, tables.index_buffer, triangles);
ibToTriangles(&result.vertex_buffer, tables.index_buffer, tables.sharp_edges, triangles);
QVector<Triangle> all_triangles;
regularIbToTriangles(&result.vertex_buffer, tables.extra_triangles, all_triangles);
all_triangles += triangles;
......@@ -155,7 +155,7 @@ Subdivision::Tables Subdivision::precomputeTables(Input input) {
QTime subTimer;
subTimer.start();
QVector<Triangle> triangles;
regularIbToTriangles(&vb, ib, triangles);
ibToTriangles(&vb, ib, se, triangles);
QVector<Triangle> triangles_regular;
regularIbToTriangles(&vb, ib_regular, triangles_regular);
......@@ -721,8 +721,9 @@ void Subdivision::splitRegular(Mesh *mesh) {
Mesh::MeshEntry *current_mesh = mesh->getMeshEntry(first_mesh_index);
QVector<Triangle> all_triangles;
regularIbToTriangles(&current_mesh->buffers[0]->vertices,
ibToTriangles(&current_mesh->buffers[0]->vertices,
current_mesh->buffers[0]->indices_irregular,
current_mesh->buffers[0]->m_sharp_edges,
all_triangles);
QVector<unsigned int> old_regular_ib = patchIBToTriangleIB(current_mesh->buffers[0]->indices_regular);
regularIbToTriangles(&current_mesh->buffers[0]->vertices, old_regular_ib, all_triangles);
......
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