pub struct DrawMap {Show 16 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>,
quadtree_ids: HashMap<ID, ItemId>,
}
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>
quadtree_ids: HashMap<ID, ItemId>
Implementations
sourceimpl DrawMap
impl DrawMap
pub fn new(
ctx: &mut EventCtx<'_>,
map: &Map,
opts: &Options,
cs: &ColorScheme,
timer: &mut Timer<'_>
) -> DrawMap
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>(
&'a self,
ctx: &EventCtx<'_>,
id: ID,
app: &dyn AppLike,
agents: &'a mut AgentCache
) -> Option<&'a dyn Renderable>
sourcepub fn get_matching_objects(&self, bounds: Bounds) -> Vec<ID>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_matching_objects(&self, bounds: Bounds) -> Vec<ID>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Unsorted, unexpanded, raw result.
sourcepub fn get_renderables_back_to_front(
&self,
bounds: Bounds,
map: &Map
) -> Vec<&dyn Renderable>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
pub fn get_renderables_back_to_front(
&self,
bounds: Bounds,
map: &Map
) -> Vec<&dyn Renderable>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
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 !RefUnwindSafe for DrawMap
impl !Send for DrawMap
impl !Sync for DrawMap
impl Unpin for DrawMap
impl UnwindSafe for DrawMap
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn 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 T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
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
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
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. Read more
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. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self