pub struct Model {
pub map: RawMap,
showing_pts: Option<RoadID>,
pub world: World<ID>,
pub include_bldgs: bool,
pub intersection_geom: bool,
}
Fields§
§map: RawMap
§showing_pts: Option<RoadID>
§world: World<ID>
§include_bldgs: bool
§intersection_geom: bool
Implementations§
Source§impl Model
impl Model
pub fn export_to_osm(&mut self)
pub fn set_boundary( &mut self, ctx: &EventCtx<'_>, top_left: Pt2D, bottom_right: Pt2D, )
Source§impl Model
impl Model
fn intersection_added(&mut self, ctx: &EventCtx<'_>, id: IntersectionID)
pub fn create_i(&mut self, ctx: &EventCtx<'_>, point: Pt2D)
pub fn move_i(&mut self, ctx: &EventCtx<'_>, id: IntersectionID, point: Pt2D)
pub fn delete_i(&mut self, id: IntersectionID)
pub fn toggle_i(&mut self, ctx: &EventCtx<'_>, id: IntersectionID)
pub fn show_intersection_geometry(&mut self, ctx: &mut EventCtx<'_>, show: bool)
Source§impl Model
impl Model
pub fn road_added(&mut self, ctx: &EventCtx<'_>, id: RoadID)
pub fn road_deleted(&mut self, id: RoadID)
pub fn create_r( &mut self, ctx: &EventCtx<'_>, i1: IntersectionID, i2: IntersectionID, )
pub fn delete_r(&mut self, ctx: &EventCtx<'_>, id: RoadID)
pub fn show_r_points(&mut self, ctx: &EventCtx<'_>, id: RoadID)
pub fn stop_showing_pts(&mut self, id: RoadID)
pub fn move_r_pt( &mut self, ctx: &EventCtx<'_>, id: RoadID, idx: usize, point: Pt2D, )
fn change_r_points<F: FnMut(&mut Vec<Pt2D>)>( &mut self, ctx: &EventCtx<'_>, id: RoadID, transform: F, )
pub fn delete_r_pt(&mut self, ctx: &EventCtx<'_>, id: RoadID, idx: usize)
pub fn insert_r_pt(&mut self, ctx: &EventCtx<'_>, id: RoadID, pt: Pt2D)
pub fn clear_r_pts(&mut self, ctx: &EventCtx<'_>, id: RoadID)
pub fn merge_r(&mut self, ctx: &EventCtx<'_>, id: RoadID)
pub fn toggle_junction(&mut self, ctx: &EventCtx<'_>, id: RoadID)
Auto Trait Implementations§
impl Freeze for Model
impl RefUnwindSafe for Model
impl !Send for Model
impl !Sync for Model
impl Unpin for Model
impl UnwindSafe for Model
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.