Struct map_gui::render::map::DrawMap [−][src]
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
pub fn new(
ctx: &mut EventCtx<'_>,
map: &Map,
opts: &Options,
cs: &ColorScheme,
timer: &mut Timer<'_>
) -> DrawMap
pub fn regenerate_unzoomed_layer(
map: &Map,
cs: &ColorScheme,
ctx: &EventCtx<'_>,
timer: &mut Timer<'_>
) -> Drawable
pub fn get_obj<'a>(
&'a self,
ctx: &EventCtx<'_>,
id: ID,
app: &dyn AppLike,
agents: &'a mut AgentCache
) -> Option<&'a dyn Renderable>
Unsorted, unexpanded, raw result.
pub 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.
Build a single gigantic GeomBatch
to render the entire map when zoomed in. Likely messes
up Z-ordering.
Auto Trait Implementations
impl !RefUnwindSafe for DrawMap
impl UnwindSafe for DrawMap
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: 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
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub 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
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub 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
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self