summaryrefslogtreecommitdiff
path: root/src/animate.hpp
blob: 793771db52aedd8759e00279a66691663ef3cac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
};