// // Created by symeon on 06/04/19. // #ifndef FEIS_DENSITYGRAPH_H #define FEIS_DENSITYGRAPH_H #include #include #include "../Chart.h" class DensityGraph { public: struct density_entry { int density; bool has_collisions; }; DensityGraph(); sf::Texture base_texture; sf::Sprite normal_square; sf::Sprite collision_square; sf::RenderTexture graph; sf::FloatRect graph_rect; bool should_recompute = true; std::vector densities; std::optional last_height; std::optional last_section_length; void computeDensities(int height, float chartRuntime, Chart& chart, float BPM, int resolution); void updateGraphTexture(); private: std::__cxx11::string texture_path = "assets/textures/edit_textures/game_front_edit_tex_1.tex.png"; }; #endif //FEIS_DENSITYGRAPH_H