mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 12:12:00 +03:00
couple together crosswalks in stop sign editor
This commit is contained in:
parent
636eb1fb1c
commit
546213e82b
@ -48,7 +48,7 @@
|
|||||||
- move map_model geometry stuff elsewhere (sim stuff also needs it though)
|
- move map_model geometry stuff elsewhere (sim stuff also needs it though)
|
||||||
|
|
||||||
- better drawing
|
- better drawing
|
||||||
- detailed turns, like https://i.ytimg.com/vi/NH6R3RH_ZDY/maxresdefault.jpg
|
- bezier turns for lane markings, turn icons, agent turn signals?
|
||||||
- rooftops
|
- rooftops
|
||||||
- https://thumbs.dreamstime.com/b/top-view-city-street-asphalt-transport-people-walking-down-sidewalk-intersecting-road-pedestrian-81034411.jpg
|
- https://thumbs.dreamstime.com/b/top-view-city-street-asphalt-transport-people-walking-down-sidewalk-intersecting-road-pedestrian-81034411.jpg
|
||||||
- https://thumbs.dreamstime.com/z/top-view-city-seamless-pattern-streets-roads-houses-cars-68652655.jpg
|
- https://thumbs.dreamstime.com/z/top-view-city-seamless-pattern-streets-roads-houses-cars-68652655.jpg
|
||||||
|
@ -25,12 +25,16 @@ impl ControlStopSign {
|
|||||||
self.turns[&turn]
|
self.turns[&turn]
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_priority(&mut self, turn: TurnID, priority: TurnPriority, map: &Map) {
|
pub fn set_priority(&mut self, t: TurnID, priority: TurnPriority, map: &Map) {
|
||||||
assert_ne!(self.turns[&turn], priority);
|
assert_ne!(self.turns[&t], priority);
|
||||||
if priority == TurnPriority::Priority {
|
if priority == TurnPriority::Priority {
|
||||||
assert!(self.could_be_priority_turn(turn, map));
|
assert!(self.could_be_priority_turn(t, map));
|
||||||
|
}
|
||||||
|
self.turns.insert(t, priority);
|
||||||
|
let turn = map.get_t(t);
|
||||||
|
if turn.turn_type == TurnType::Crosswalk {
|
||||||
|
self.turns.insert(turn.other_crosswalk_id(), priority);
|
||||||
}
|
}
|
||||||
self.turns.insert(turn, priority);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn could_be_priority_turn(&self, id: TurnID, map: &Map) -> bool {
|
pub fn could_be_priority_turn(&self, id: TurnID, map: &Map) -> bool {
|
||||||
|
Loading…
Reference in New Issue
Block a user