New cpp folder structure

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-17 22:35:52 +03:00
committed by Konstantin Pastbin
parent c9cbb64f12
commit 76ffc99abd
2390 changed files with 345 additions and 339 deletions

View File

@@ -0,0 +1,33 @@
#pragma once
#include "animation_system.hpp"
#include "drape/pointers.hpp"
#include <chrono>
#include <deque>
namespace df
{
class KineticScroller
{
public:
void Init(ScreenBase const & modelView);
void Update(ScreenBase const & modelView);
bool IsActive() const;
void Cancel();
drape_ptr<Animation> CreateKineticAnimation(ScreenBase const & modelView);
private:
std::pair<m2::PointD, double> GetDirectionAndVelocity(ScreenBase const & modelView) const;
using ClockT = std::chrono::steady_clock;
static double GetDurationSeconds(ClockT::time_point const & t2, ClockT::time_point const & t1)
{
return std::chrono::duration_cast<std::chrono::duration<double>>(t2 - t1).count();
}
std::deque<std::pair<m2::PointD, ClockT::time_point>> m_points;
bool m_isActive = false;
};
} // namespace df