pub struct DrawMap {Show 15 fields
pub roads: Vec<DrawRoad>,
pub intersections: Vec<DrawIntersection>,
pub buildings: Vec<DrawBuilding>,
pub parking_lots: Vec<DrawParkingLot>,
pub bus_stops: HashMap<TransitStopID, DrawTransitStop>,
pub areas: Vec<DrawArea>,
pub boundary_polygon: Drawable,
pub draw_all_unzoomed_roads_and_intersections: Drawable,
pub draw_all_buildings: Drawable,
pub draw_all_building_outlines: Drawable,
pub draw_all_unzoomed_parking_lots: Drawable,
pub draw_all_areas: Drawable,
pub zorder_range: (isize, isize),
pub show_zorder: isize,
quadtree: QuadTree<ID>,
}
Fields§
§roads: Vec<DrawRoad>
§intersections: Vec<DrawIntersection>
§buildings: Vec<DrawBuilding>
§parking_lots: Vec<DrawParkingLot>
§bus_stops: HashMap<TransitStopID, DrawTransitStop>
§areas: Vec<DrawArea>
§boundary_polygon: Drawable
§draw_all_unzoomed_roads_and_intersections: Drawable
§draw_all_buildings: Drawable
§draw_all_building_outlines: Drawable
§draw_all_unzoomed_parking_lots: Drawable
§draw_all_areas: Drawable
§zorder_range: (isize, isize)
§show_zorder: isize
§quadtree: QuadTree<ID>
Implementations§
source§impl DrawMap
impl DrawMap
pub fn new( ctx: &mut EventCtx<'_>, map: &Map, opts: &Options, cs: &ColorScheme, timer: &mut Timer<'_> ) -> DrawMap
pub fn regenerate_buildings( ctx: &EventCtx<'_>, map: &Map, cs: &ColorScheme, opts: &Options, timer: &mut Timer<'_> ) -> (Vec<DrawBuilding>, Drawable, Drawable)
pub fn regenerate_parking_lots( ctx: &EventCtx<'_>, map: &Map, cs: &ColorScheme, opts: &Options ) -> (Vec<DrawParkingLot>, Drawable)
pub fn regenerate_unzoomed_layer( ctx: &EventCtx<'_>, map: &Map, cs: &ColorScheme, opts: &Options, timer: &mut Timer<'_> ) -> Drawable
pub fn get_r(&self, id: RoadID) -> &DrawRoad
pub fn get_l(&self, id: LaneID) -> &DrawLane
pub fn get_i(&self, id: IntersectionID) -> &DrawIntersection
pub fn get_b(&self, id: BuildingID) -> &DrawBuilding
pub fn get_pl(&self, id: ParkingLotID) -> &DrawParkingLot
pub fn get_ts(&self, id: TransitStopID) -> &DrawTransitStop
pub fn get_a(&self, id: AreaID) -> &DrawArea
pub fn get_obj<'a>(&self, id: ID) -> &dyn Renderable
sourcepub fn get_matching_objects(&self, bounds: Bounds) -> Vec<ID>
pub fn get_matching_objects(&self, bounds: Bounds) -> Vec<ID>
Unsorted, unexpanded, raw result.
sourcepub fn get_renderables_back_to_front(
&self,
bounds: Bounds,
map: &Map
) -> Vec<&dyn Renderable>
pub fn get_renderables_back_to_front( &self, bounds: Bounds, map: &Map ) -> Vec<&dyn Renderable>
A simple variation of the one in game that shows all layers, ignores dynamic agents.
sourcepub fn zoomed_batch(ctx: &EventCtx<'_>, app: &dyn AppLike) -> GeomBatch
pub fn zoomed_batch(ctx: &EventCtx<'_>, app: &dyn AppLike) -> GeomBatch
Build a single gigantic GeomBatch
to render the entire map when zoomed in. Likely messes
up Z-ordering.
pub fn recreate_intersection(&mut self, i: IntersectionID, map: &Map)
pub fn recreate_road(&mut self, road: &Road, map: &Map)
pub fn free_memory(&mut self)
Auto Trait Implementations§
impl Freeze for DrawMap
impl !RefUnwindSafe for DrawMap
impl !Send for DrawMap
impl !Sync for DrawMap
impl Unpin for DrawMap
impl UnwindSafe for DrawMap
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.