1use geom::{Angle, Distance, PolyLine, Pt2D};
4use map_model::{BuildingID, ParkingLotID, Traversable, TurnID};
5
6use crate::{AgentID, CarID, PedestrianID, PersonID};
7
8#[derive(Clone)]
9pub struct DrawPedestrianInput {
10 pub id: PedestrianID,
11 pub pos: Pt2D,
12 pub facing: Angle,
13 pub waiting_for_turn: Option<TurnID>,
14 pub intent: Option<Intent>,
15 pub preparing_bike: bool,
16 pub waiting_for_bus: bool,
17 pub on: Traversable,
18 pub person: PersonID,
19}
20
21pub struct DrawPedCrowdInput {
22 pub low: Distance,
23 pub high: Distance,
24 pub members: Vec<PedestrianID>,
25 pub location: PedCrowdLocation,
26}
27
28#[derive(Clone)]
29pub enum PedCrowdLocation {
30 Sidewalk(Traversable, bool),
32 BldgDriveway(BuildingID),
33 LotDriveway(ParkingLotID),
34}
35
36#[derive(Clone)]
37pub struct DrawCarInput {
38 pub id: CarID,
39 pub waiting_for_turn: Option<TurnID>,
40 pub status: CarStatus,
41 pub intent: Option<Intent>,
42 pub on: Traversable,
44 pub partly_on: Vec<Traversable>,
46 pub label: Option<String>,
47 pub person: Option<PersonID>,
49
50 pub body: PolyLine,
52}
53
54#[derive(Clone, Copy, PartialEq, Eq)]
55pub enum CarStatus {
56 Moving,
57 Parked,
58}
59
60#[derive(Clone, PartialEq)]
62pub enum Intent {
63 Parking,
64 SteepUphill,
65}
66
67pub struct UnzoomedAgent {
68 pub id: AgentID,
69 pub pos: Pt2D,
70 pub person: Option<PersonID>,
72 pub parking: bool,
75}