#pragma once #include "game/classicnote.h" #include "graphics/classicgraphicsmanager.h" #include "core/timeline.h" class ClassicSprite; class ClassicSceneGraphicsManager : public ClassicGraphicsManager { public: explicit ClassicSceneGraphicsManager(const std::shared_ptr>& timeline, const std::shared_ptr& factory, const kku::microsec& visibility_offset); virtual void display() const override; virtual void update(const kku::microsec& offset) override; virtual void display(const std::vector& elements) const override; virtual void setGraphics(std::vector& elements, kku::TimeRange&& range) override; protected: using Iterator = kku::Timeline::Iterator; Iterator _first; Iterator _last; const std::shared_ptr> _timeline; inline bool nothingToDraw() const noexcept; inline bool isVisiblyClose(const Iterator& iterator, const kku::microsec& music_offset) const noexcept; //inline sf::VertexArray makeLine(const kku::Point& c1, const kku::Point& c2) const; void fetchFirstNote(const kku::microsec& offset); void fetchLastNote(const kku::microsec& offset); void updateVisibleNotes(const kku::microsec& offset); };