Struct map_model::city::City [−][src]
pub struct City { pub name: CityName, pub boundary: Polygon, pub areas: Vec<(AreaType, Polygon)>, pub districts: Vec<(MapName, Polygon)>, }
A single city (like Seattle) can be broken down into multiple boundary polygons (udistrict, ballard, downtown, etc). The load map screen uses this struct to display the entire city.
Fields
name: CityName
boundary: Polygon
areas: Vec<(AreaType, Polygon)>
districts: Vec<(MapName, Polygon)>
The individual maps
Implementations
impl City
[src]
impl City
[src]pub fn from_huge_map(huge_map: &Map) -> City
[src]
If there’s a single map covering all the smaller maps, use this.
pub fn from_individual_maps(city_name: &CityName, timer: &mut Timer<'_>) -> City
[src]
Generate a city from a bunch of smaller, individual maps. The boundaries of those maps may overlap and may have gaps between them.
Trait Implementations
impl<'de> Deserialize<'de> for City
[src]
impl<'de> Deserialize<'de> for City
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for City
impl Send for City
impl Sync for City
impl Unpin for City
impl UnwindSafe for City
Blanket Implementations
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,