114 |
DBG(dbg) << "Triangler: dice\n"; |
DBG(dbg) << "Triangler: dice\n"; |
115 |
typedef std::pair<int, int> Edge; |
typedef std::pair<int, int> Edge; |
116 |
vector<Edge> tosplit; |
vector<Edge> tosplit; |
117 |
|
int round = 0; |
118 |
while(1) { |
while(1) { |
119 |
DBG(dbg) << "Triangler: dice round\n"; |
DBG(dbg) << "Triangler: dice round\n"; |
120 |
for(Titer t = tris.begin(); t != tris.end(); t++) { |
for(Titer t = tris.begin(); t != tris.end(); t++) { |
128 |
for(unsigned i=0; i<tosplit.size(); i++) |
for(unsigned i=0; i<tosplit.size(); i++) |
129 |
splitEdge(tosplit[i].first, tosplit[i].second); |
splitEdge(tosplit[i].first, tosplit[i].second); |
130 |
tosplit.clear(); |
tosplit.clear(); |
131 |
|
round ++; |
132 |
|
if(round > 20) { |
133 |
|
DBG(dbg) << "OVER ROUND LIMIT! ABORTING!\n"; |
134 |
|
return; |
135 |
|
} |
136 |
} |
} |
137 |
} |
} |
138 |
void draw() { |
void draw() { |