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

cross_mwm_router.hpp « routing - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: abc5f0baf843dcd51998c7c535a1b9f01e1a6616 (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
38
39
40
41
42
43
44
45
#pragma once

#include "osrm_engine.hpp"
#include "router.hpp"
#include "routing_mapping.hpp"

#include "std/string.hpp"
#include "std/vector.hpp"

namespace routing
{
/*!
 * \brief The RoutePathCross struct contains information neaded to describe path inside single map.
 */
struct RoutePathCross
{
  FeatureGraphNode startNode; /**< start graph node representation */
  FeatureGraphNode finalNode; /**< end graph node representation */

  RoutePathCross(NodeID const startNodeId, m2::PointD const & startPoint, NodeID const finalNodeId, m2::PointD const & finalPoint, Index::MwmId const & id)
      : startNode(startNodeId, true /* isStartNode */, id),
        finalNode(finalNodeId, false /* isStartNode*/, id)
  {
    startNode.segmentPoint = startPoint;
    finalNode.segmentPoint = finalPoint;
  }
};

using TCheckedPath = vector<RoutePathCross>;

/*!
 * \brief CalculateCrossMwmPath function for calculating path through several maps.
 * \param startGraphNodes The vector of starting routing graph nodes.
 * \param finalGraphNodes The vector of final routing graph nodes.
 * \param route Storage for the result records about crossing maps.
 * \param indexManager Manager for getting indexes of new countries.
 * \param cost Found path cost.
 * \param RoutingVisualizerFn Debug visualization function.
 * \return NoError if the path exists, error code otherwise.
 */
IRouter::ResultCode CalculateCrossMwmPath(TRoutingNodes const & startGraphNodes,
                                          TRoutingNodes const & finalGraphNodes,
                                          RoutingIndexManager & indexManager, double & cost,
                                          RouterDelegate const & delegate, TCheckedPath & route);
}  // namespace routing