osrm-backend/include/engine/guidance/step_maneuver.hpp
Patrick Niklaus 95af72c70c
Make intersection backwards compatible
For `depart` and `arrive` `step.intersections[0].{bearings|entry}` will have
only one entry.
2016-05-19 16:44:31 +02:00

48 lines
902 B
C++

#ifndef ENGINE_GUIDANCE_STEP_MANEUVER_HPP
#define ENGINE_GUIDANCE_STEP_MANEUVER_HPP
#include "extractor/guidance/turn_instruction.hpp"
#include "util/coordinate.hpp"
#include <cstdint>
#include <vector>
namespace osrm
{
namespace engine
{
namespace guidance
{
enum class WaypointType : std::uint8_t
{
None,
Arrive,
Depart,
};
struct StepManeuver
{
util::Coordinate location;
short bearing_before;
short bearing_after;
extractor::guidance::TurnInstruction instruction;
WaypointType waypoint_type;
unsigned exit;
};
inline StepManeuver getInvalidStepManeuver()
{
return {util::Coordinate{util::FloatLongitude{0.0}, util::FloatLatitude{0.0}},
0,
0,
extractor::guidance::TurnInstruction::NO_TURN(),
WaypointType::None,
0};
}
} // namespace guidance
} // namespace engine
} // namespace osrmn
#endif