Commit 4e5f6931 by Kai Westerkamp

small subdiv changes

parent 885e3f3d
......@@ -420,10 +420,12 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
totalTimer.start();
qCDebug(log_timing)<<"PatchIndexBuffer started";
QVector<unsigned int> pib;
if (ib_regular.size() == 0) return pib;
QVector<unsigned int> ib_combined = ib_regular + ib_irregular; //DO NOT swap regular and irregular! iteration over ib_combined starting from index in ib_regular
QMap<Triangle,QVector<Triangle>> adj;
// qDebug()<<"combined lenght"<<ib_combined.length();
for (int i = 0; i < ib_combined.length() - 2; i+=3){
// qDebug()<<"Index"<<i;
unsigned int i3,i6,i7;
//alles gegen den uzs
......@@ -431,6 +433,7 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
i6 = ib_combined[i+1];
i7 = ib_combined[i+2];
if(log_subdiv_trace().isDebugEnabled()){
if (i < ib_regular.length()){
Vertex v3 = vb[i3];
......@@ -469,13 +472,14 @@ QVector<unsigned int> Subdivision::getPatchIndexBuffer(QVector<unsigned int> ib_
neighbors.push_back(t367);
adj.insert(tj,neighbors);
neighbors = adj.value(t367,QVector<Triangle>());
if (neighbors.length() == 3) break;
neighbors.push_back(tj);
adj.insert(t367,neighbors);
}
}
if (adj.value(t367,QVector<Triangle>()).size() != 3){
qCDebug(log_subdiv)<<"no 3 adjacent triangles found";
qCDebug(log_subdiv_trace)<<"no 3 adjacent triangles found";
}
}
......
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