[][src]Struct sim::mechanics::walking::WalkingSimState

pub struct WalkingSimState {
    peds: FixedMap<PedestrianID, Pedestrian>,
    peds_per_traversable: MultiMap<Traversable, PedestrianID>,
    events: Vec<Event>,
}

Simulates pedestrians. Unlike vehicles, pedestrians can move bidirectionally on sidewalks and just "ghost" through each other. There's no queueing or slowdown when many people are overlapping. They're simply grouped together into a DrawPedCrowdInput for rendering.

Fields

peds: FixedMap<PedestrianID, Pedestrian>peds_per_traversable: MultiMap<Traversable, PedestrianID>events: Vec<Event>

Implementations

impl WalkingSimState[src]

pub fn new() -> WalkingSimState[src]

pub fn spawn_ped(
    &mut self,
    now: Time,
    params: CreatePedestrian,
    map: &Map,
    scheduler: &mut Scheduler
)
[src]

pub fn get_draw_ped(
    &self,
    id: PedestrianID,
    now: Time,
    map: &Map
) -> Option<DrawPedestrianInput>
[src]

pub fn get_all_draw_peds(
    &self,
    now: Time,
    map: &Map
) -> Vec<DrawPedestrianInput>
[src]

pub fn update_ped(
    &mut self,
    id: PedestrianID,
    now: Time,
    ctx: &mut Ctx<'_>,
    trips: &mut TripManager,
    transit: &mut TransitSimState
)
[src]

pub fn ped_boarded_bus(&mut self, now: Time, id: PedestrianID)[src]

pub fn delete_ped(&mut self, id: PedestrianID, scheduler: &mut Scheduler)[src]

pub fn debug_ped(&self, id: PedestrianID)[src]

pub fn agent_properties(&self, id: PedestrianID, now: Time) -> AgentProperties[src]

pub fn trace_route(
    &self,
    now: Time,
    id: PedestrianID,
    map: &Map,
    dist_ahead: Option<Distance>
) -> Option<PolyLine>
[src]

pub fn get_path(&self, id: PedestrianID) -> Option<&Path>[src]

pub fn get_unzoomed_agents(&self, now: Time, map: &Map) -> Vec<UnzoomedAgent>[src]

pub fn does_ped_exist(&self, id: PedestrianID) -> bool[src]

pub fn get_draw_peds_on(
    &self,
    now: Time,
    on: Traversable,
    map: &Map
) -> (Vec<DrawPedestrianInput>, Vec<DrawPedCrowdInput>)
[src]

pub fn collect_events(&mut self) -> Vec<Event>[src]

pub fn find_trips_to_parking(
    &self,
    evicted_cars: Vec<ParkedCar>
) -> Vec<(AgentID, TripID)>
[src]

pub fn all_waiting_people(
    &self,
    now: Time,
    delays: &mut BTreeMap<PersonID, Duration>
)
[src]

Trait Implementations

impl Clone for WalkingSimState[src]

impl<'de> Deserialize<'de> for WalkingSimState[src]

impl Serialize for WalkingSimState[src]

Auto Trait Implementations

impl RefUnwindSafe for WalkingSimState

impl Send for WalkingSimState

impl Sync for WalkingSimState

impl Unpin for WalkingSimState

impl UnwindSafe for WalkingSimState

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,