CARLA
 
载入中...
搜索中...
未找到
road/element/Waypoint.cpp
浏览该文件的文档.
1// Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
8
9#include <boost/container_hash/hash.hpp>
10
11namespace std {
12
13 using WaypointHash = hash<carla::road::element::Waypoint>;
14
17 boost::hash_combine(seed, waypoint.road_id);
18 boost::hash_combine(seed, waypoint.section_id);
19 boost::hash_combine(seed, waypoint.lane_id);
20 boost::hash_combine(seed, static_cast<float>(std::floor(waypoint.s * 200.0)));
21 return seed;
22 }
23
24} // namespace std
result_type operator()(const argument_type &waypoint) const
Generates an unique id for waypoint based on its road_id, lane_id, section_id, and "s" offset.