summaryrefslogtreecommitdiff
path: root/src/animate.hpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-20 12:20:19 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-12-20 12:20:19 -0500
commit09200a607661f739782a966807d31345485e2c41 (patch)
treeb459bd995c986c87959ffd7ae99c68f9939e2009 /src/animate.hpp
parentb1b18ae49b0d22d3fbd5146eb6416c8b9e4dd62c (diff)
downloadfuse_networks-09200a607661f739782a966807d31345485e2c41.tar.gz
fuse_networks-09200a607661f739782a966807d31345485e2c41.tar.bz2
fuse_networks-09200a607661f739782a966807d31345485e2c41.zip
added animation example, and did many fixes to the voronoi system
Diffstat (limited to 'src/animate.hpp')
-rw-r--r--src/animate.hpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/animate.hpp b/src/animate.hpp
new file mode 100644
index 0000000..793771d
--- /dev/null
+++ b/src/animate.hpp
@@ -0,0 +1,24 @@
+
+
+#include <functional>
+#include <hooks.hpp>
+
+#include "analysis_tools.hpp"
+
+#include <GL/glut.h>
+
+class animate : public hooks {
+ private:
+ unsigned int Lx;
+ unsigned int Ly;
+ Graph G;
+ public:
+ long double lv;
+ std::list<std::list<unsigned int>> avalanches;
+
+ animate(unsigned int Lx, unsigned int Ly, unsigned int window_size, int argc, char *argv[]);
+
+ void pre_fracture(const network &) override;
+ void bond_broken(const network& net, const current_info& cur, unsigned int i) override;
+ void post_fracture(network &n) override;
+};