#ifndef AW_LANE_H #define AW_LANE_H #include #include #include #include #include #include #include #define FT2M_FACTOR 0.3048 namespace vlr { namespace rndf { class Segment; class Intersection; typedef std::map TLaneMap; typedef std::set TLaneSet; class Lane : public NetElement { public: friend class RoadNetwork; static const double default_width = 4.5; enum eBoundaryTypes { UnknownBoundary = 0, NoBoundary = 1, SolidWhite = 2, BrokenWhite = 3, SolidYellow = 4, DoubleYellow = 5 }; enum eType{car_lane, bike_lane}; Lane(uint32_t id, const std::string& strName, const bool isVirtual = false); virtual ~Lane(void); Lane(const Lane&); Lane& operator=(const Lane& other); Lane& copy(const Lane& other); void setSegment(Segment* segm) { segment_=segm; } Segment* getSegment(void) const { return segment_; } void setLaneWidth(double laneWidth) { lane_width_ = laneWidth; } double getLaneWidth() const { return lane_width_; } void setLaneType(eType t) { type_ = t; } eType getLaneType() const { return type_; } void setLeftBoundaryType(Lane::eBoundaryTypes leftBoundaryType) { left_boundary_type_ = leftBoundaryType; } void setRightBoundaryType(Lane::eBoundaryTypes rightBoundaryType) { right_boundary_type_ = rightBoundaryType; } Lane::eBoundaryTypes getLeftBoundaryType() {return left_boundary_type_; } Lane::eBoundaryTypes getRightBoundaryType() { return right_boundary_type_; } void setSpeedLimit(SpeedLimit* limit) {speed_limit_ = limit;} SpeedLimit* getSpeedLimit() {return speed_limit_;} const SpeedLimit* getSpeedLimit() const {return speed_limit_;} //! adds a waypoint to the Lane bool addWayPoint(WayPoint* pWayPoint); bool addWayPoint(WayPoint* pWayPoint, uint32_t insert_before); void removeWayPoint(WayPoint* pWayPoint); void removeWayPoint(uint32_t index); WayPoint* getWaypoint(uint32_t index) { return (indexname() << ", " << name() << ", "<< nextIdStr(waypoints_) << std::endl; // return segment_->name() + name() + nextIdStr(waypoints_); // } private: TWayPointVec waypoints_; TExitMap exits_; TExitMap entries_; TCheckPointMap checkpoints_; TStopMap stops_; TLaneSegmentVec lane_segments_; Segment* segment_; // parent Segment of the Lane SpeedLimit* speed_limit_; double lane_width_; eBoundaryTypes left_boundary_type_; eBoundaryTypes right_boundary_type_; double lat_sum_, lon_sum_, length_; bool is_virtual_; bool bbox_valid_; double xmin_, ymin_, xmax_, ymax_; eType type_; friend std::ostream& operator<<(std::ostream& os, const Lane& l); }; // ASCII stream IO std::ostream& operator<<(std::ostream& os, const Lane& l); }; } // namespace vlr #endif