CARLA
 
载入中...
搜索中...
未找到
Junction.cpp
浏览该文件的文档.
1// Copyright (c) 2020 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#include "carla/client/Map.h"
10
11namespace carla {
12namespace client {
13
14 Junction::Junction(SharedPtr<const Map> parent, const road::Junction *junction) : _parent(parent) {
15 _bounding_box = junction->GetBoundingBox();
16 _id = junction->GetId();
17 }
18
19 std::vector<std::pair<SharedPtr<Waypoint>, SharedPtr<Waypoint>>> Junction::GetWaypoints(
20 road::Lane::LaneType type) const {
21 return _parent->GetJunctionWaypoints(GetId(), type);
22 }
23
24 geom::BoundingBox Junction::GetBoundingBox() const {
25 return _bounding_box;
26 }
27
28} // namespace client
29} // namespace carla
carla::road::JuncId GetId() const
geom::BoundingBox _bounding_box
SharedPtr< const Map > _parent
JuncId GetId() const
carla::geom::BoundingBox GetBoundingBox() const
LaneType
Can be used as flags
Definition Lane.h:29
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133
boost::shared_ptr< T > SharedPtr
Use this SharedPtr (boost::shared_ptr) to keep compatibility with boost::python, but it would be nice...
Definition Memory.h:20