Welcome to mirror list, hosted at ThFree Co, Russian Federation.

route_builder.hpp « drape_frontend - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8bcf046af08cd343f199287419c2005c99a3803a (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
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once

#include "drape_frontend/color_constants.hpp"
#include "drape_frontend/route_shape.hpp"

#include "drape/pointers.hpp"
#include "drape/texture_manager.hpp"

#include "geometry/polyline2d.hpp"

#include "std/function.hpp"

namespace df
{

class RouteBuilder
{
public:
  using TFlushRouteFn = function<void(drape_ptr<RouteData> &&)>;
  using TFlushRouteSignFn = function<void(drape_ptr<RouteSignData> &&)>;

  RouteBuilder(TFlushRouteFn const & flushRouteFn,
               TFlushRouteSignFn const & flushRouteSignFn);

  void Build(m2::PolylineD const & routePolyline, vector<double> const & turns,
             df::ColorConstant color, df::RoutePattern const & pattern,
             ref_ptr<dp::TextureManager> textures);

  void BuildSign(m2::PointD const & pos, bool isStart, bool isValid,
                 ref_ptr<dp::TextureManager> textures);

private:
  TFlushRouteFn m_flushRouteFn;
  TFlushRouteSignFn m_flushRouteSignFn;
};

} // namespace df