osrm-backend/include/extractor/extraction_turn.hpp
Moritz Kobitzsch bbcf343e40 compress traffic signals
- handle penalties within edges (not phantom nodes)
 - changes model from providing penalties on turns to using additional segments
2017-08-04 11:19:32 +02:00

46 lines
1.2 KiB
C++

#ifndef OSRM_EXTRACTION_TURN_HPP
#define OSRM_EXTRACTION_TURN_HPP
#include <boost/numeric/conversion/cast.hpp>
#include <extractor/guidance/intersection.hpp>
#include <cstdint>
namespace osrm
{
namespace extractor
{
struct ExtractionTurn
{
ExtractionTurn(const guidance::ConnectedRoad &turn, bool has_traffic_light)
: angle(180. - turn.angle), turn_type(turn.instruction.type),
direction_modifier(turn.instruction.direction_modifier),
has_traffic_light(has_traffic_light), weight(0.), duration(0.), source_restricted(false),
target_restricted(false)
{
}
ExtractionTurn(const bool has_traffic_light = false)
: angle(0), turn_type(guidance::TurnType::NoTurn),
direction_modifier(guidance::DirectionModifier::Straight),
has_traffic_light(has_traffic_light), weight(0.), duration(0.), source_restricted(false),
target_restricted(false)
{
}
const double angle;
const guidance::TurnType::Enum turn_type;
const guidance::DirectionModifier::Enum direction_modifier;
const bool has_traffic_light;
double weight;
double duration;
bool source_restricted;
bool target_restricted;
};
}
}
#endif