pub struct Movement {
pub id: MovementID,
pub turn_type: TurnType,
pub members: Vec<TurnID>,
pub geom: PolyLine,
pub angle: Angle,
}
Expand description
A Movement groups all turns from one road to another, letting traffic signals and pathfinding operate at a higher level of abstraction.
Fields§
§id: MovementID
§turn_type: TurnType
§members: Vec<TurnID>
§geom: PolyLine
The “overall” path of movement, aka, an “average” of the turn geometry
angle: Angle
Implementations§
source§impl Movement
impl Movement
pub(crate) fn for_i( i: IntersectionID, map: &Map ) -> BTreeMap<MovementID, Movement>
sourcepub fn src_center_and_width(&self, map: &Map) -> (PolyLine, Distance)
pub fn src_center_and_width(&self, map: &Map) -> (PolyLine, Distance)
Polyline points FROM intersection
pub fn conflicts_with(&self, other: &Movement) -> bool
Trait Implementations§
source§impl<'de> Deserialize<'de> for Movement
impl<'de> Deserialize<'de> for Movement
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for Movement
impl PartialEq for Movement
impl StructuralPartialEq for Movement
Auto Trait Implementations§
impl Freeze for Movement
impl RefUnwindSafe for Movement
impl Send for Movement
impl Sync for Movement
impl Unpin for Movement
impl UnwindSafe for Movement
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more