CARLA
Junction.cpp
Go to the documentation of this file.
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 
11 namespace carla {
12 namespace 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 
25  return _bounding_box;
26  }
27 
28 } // namespace client
29 } // namespace carla
SharedPtr< const Map > _parent
carla::geom::BoundingBox GetBoundingBox() const
Definition: road/Junction.h:73
std::vector< std::pair< SharedPtr< Waypoint >, SharedPtr< Waypoint > > > GetWaypoints(road::Lane::LaneType type=road::Lane::LaneType::Driving) const
Definition: Junction.cpp:19
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
This file contains definitions of common data structures used in traffic manager. ...
Definition: Carla.cpp:133
JuncId GetId() const
Definition: road/Junction.h:53
Junction(SharedPtr< const Map > parent, const road::Junction *junction)
Definition: Junction.cpp:14
LaneType
Can be used as flags.
Definition: Lane.h:29
geom::BoundingBox _bounding_box
carla::road::JuncId GetId() const
geom::BoundingBox GetBoundingBox() const
Definition: Junction.cpp:24