CARLA
road/element/Waypoint.cpp
Go to the documentation of this file.
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 
11 namespace std {
12 
14 
16  WaypointHash::result_type seed = 0u;
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...