Drake
segment.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 #include <utility>
5 #include <vector>
6 
13 
14 namespace drake {
15 namespace maliput {
16 namespace dragway {
17 
18 class Junction;
19 
55 class Segment final : public api::Segment {
56  public:
58 
59 
75  int num_lanes,
76  double length,
77  double lane_width,
78  double shoulder_width,
79  double maximum_height);
80 
81  ~Segment() final = default;
82 
83  private:
84  const api::SegmentId do_id() const final { return id_; }
85 
86  const api::Junction* do_junction() const final;
87 
88  int do_num_lanes() const final { return static_cast<int>(lanes_.size()); }
89 
90  const api::Lane* do_lane(int index) const final;
91 
92  const api::SegmentId id_;
93  const Junction* junction_{};
94  std::vector<std::unique_ptr<Lane>> lanes_;
95 };
96 
97 } // namespace dragway
98 } // namespace maliput
99 } // namespace drake
Definition: automotive_demo.cc:88
int num_lanes() const
Returns the number of Lanes contained in this Segment.
Definition: segment.h:42
A Lane represents a lane of travel in a road network.
Definition: lane.h:32
const Junction * junction() const
Returns the Junction to which this Segment belongs.
Definition: segment.h:37
Dragway&#39;s implementation of api::Junction.
Definition: junction.h:20
A Segment represents a bundle of adjacent Lanes which share a continuously traversable road surface...
Definition: segment.h:27
A Junction is a closed set of Segments which have physically coplanar road surfaces, in the sense that RoadPositions with the same h value (height above surface) in the domains of two Segments map to the same GeoPosition.
Definition: junction.h:27
TypeSpecificIdentifier< class Segment > SegmentId
Persistent identifier for a Segment element.
Definition: segment.h:17
#define DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
DRAKE_NO_COPY_NO_MOVE_NO_ASSIGN deletes the special member functions for copy-construction, copy-assignment, move-construction, and move-assignment.
Definition: drake_copyable.h:35
Dragway&#39;s implementation of api::Segment.
Definition: segment.h:55
Provides careful macros to selectively enable or disable the special member functions for copy-constr...