summaryrefslogtreecommitdiff
path: root/src/animate.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-06-29 23:54:37 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-06-29 23:54:37 -0400
commit492419f0ae1b32c1d4bc60997ca8eb7daba22182 (patch)
tree9b6d60d10cf7f3ae22cbb8cf2f4d233b71eff501 /src/animate.cpp
parent948f90b6493da83d10e18f30b0fbb8e937e29c0b (diff)
downloadfuse_networks-492419f0ae1b32c1d4bc60997ca8eb7daba22182.tar.gz
fuse_networks-492419f0ae1b32c1d4bc60997ca8eb7daba22182.tar.bz2
fuse_networks-492419f0ae1b32c1d4bc60997ca8eb7daba22182.zip
more fixes, and updating the interface
Diffstat (limited to 'src/animate.cpp')
-rw-r--r--src/animate.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/animate.cpp b/src/animate.cpp
index 532bd70..b1031dc 100644
--- a/src/animate.cpp
+++ b/src/animate.cpp
@@ -89,12 +89,14 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
*/
bool weird = false;
+ unsigned nw = 0;
for (unsigned j = 0; j < n.G.edges.size(); j++) {
bool draw = false;
if (cur.currents[j] < 1e-9 && !n.backbone[j]) {
glColor3f(1.0f, 0.0f, 0.0f); // Blue
weird = true;
+ nw++;
draw = true;
} else if (n.backbone[j] && !n.fuses[j] && j != i) {
glColor3f(0.8f, 0.8f, 0.8f); // Blue
@@ -102,6 +104,9 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
} else if (!n.fuses[j]) {
glColor3f(0.0f, 0.0f, 0.0f); // Blue
draw = true;
+ } else if (i == j) {
+ glColor3f(0.0f, 1.0f, 0.0f); // Blue
+ draw = true;
}
if (draw) {
@@ -130,7 +135,7 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
}
glEnd();
glFlush();
- if (weird) {std::cout << "\n"; getchar();}
+ if (nw > 2) {std::cout << "\n"; getchar();}
}
void animate::post_fracture(network &n) {