pub struct MapTileDescriptor { /* private fields */ }Expand description
describes a map tile
Implementations§
Source§impl MapTileDescriptor
impl MapTileDescriptor
Sourcepub fn new(zoom_level: ZoomLevel, grid_coordinates: GridCoordinates) -> Self
pub fn new(zoom_level: ZoomLevel, grid_coordinates: GridCoordinates) -> Self
create a new MapTileDescriptor
this will automatically normalize the given GridCoordinates to the
lower left corner of a map tile at that zoom level
Sourcepub const fn zoom_level(&self) -> &ZoomLevel
pub const fn zoom_level(&self) -> &ZoomLevel
the ZoomLevel of the map tile
Sourcepub const fn lower_left_corner(&self) -> &GridCoordinates
pub const fn lower_left_corner(&self) -> &GridCoordinates
the GridCoordinates of the lower left corner of this map tile
Sourcepub fn tile_size_in_pixels(&self) -> u32
pub fn tile_size_in_pixels(&self) -> u32
the size of this map tile in pixels
Sourcepub fn grid_rectangle(&self) -> GridRectangle
pub fn grid_rectangle(&self) -> GridRectangle
the grid rectangle covered by this map tile
Trait Implementations§
Source§impl Clone for MapTileDescriptor
impl Clone for MapTileDescriptor
Source§fn clone(&self) -> MapTileDescriptor
fn clone(&self) -> MapTileDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MapTileDescriptor
impl Debug for MapTileDescriptor
Source§impl<'de> Deserialize<'de> for MapTileDescriptor
impl<'de> Deserialize<'de> for MapTileDescriptor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl GridRectangleLike for MapTileDescriptor
impl GridRectangleLike for MapTileDescriptor
Source§fn grid_rectangle(&self) -> GridRectangle
fn grid_rectangle(&self) -> GridRectangle
the
GridRectangle represented by this map like imageSource§fn lower_left_corner(&self) -> GridCoordinates
fn lower_left_corner(&self) -> GridCoordinates
returns the lower left corner of the rectangle
Source§fn lower_right_corner(&self) -> GridCoordinates
fn lower_right_corner(&self) -> GridCoordinates
returns the lower right corner of the rectangle
Source§fn upper_left_corner(&self) -> GridCoordinates
fn upper_left_corner(&self) -> GridCoordinates
returns the upper left corner of the rectangle
Source§fn upper_right_corner(&self) -> GridCoordinates
fn upper_right_corner(&self) -> GridCoordinates
returns the upper right corner of the rectangle
Source§fn x_range(&self) -> RangeInclusive<u16>
fn x_range(&self) -> RangeInclusive<u16>
returns a range for the region x coordinates of this rectangle
Source§fn y_range(&self) -> RangeInclusive<u16>
fn y_range(&self) -> RangeInclusive<u16>
returns a range for the region y coordinates of this rectangle
Source§fn contains(&self, grid_coordinates: &GridCoordinates) -> bool
fn contains(&self, grid_coordinates: &GridCoordinates) -> bool
checks if a given set of
GridCoordinates is within this GridRectangleSource§fn intersect<O>(&self, other: &O) -> Option<GridRectangle>where
O: GridRectangleLike,
fn intersect<O>(&self, other: &O) -> Option<GridRectangle>where
O: GridRectangleLike,
returns a new
GridRectangle which is the area where this GridRectangle
and another intersect each other or None if there is no intersectionSource§fn pps_hud_config(&self) -> String
fn pps_hud_config(&self) -> String
returns a PPS HUD description string for this
GridRectangle Read moreSource§impl Hash for MapTileDescriptor
impl Hash for MapTileDescriptor
Source§impl PartialEq for MapTileDescriptor
impl PartialEq for MapTileDescriptor
Source§impl Serialize for MapTileDescriptor
impl Serialize for MapTileDescriptor
impl Eq for MapTileDescriptor
impl StructuralPartialEq for MapTileDescriptor
Auto Trait Implementations§
impl Freeze for MapTileDescriptor
impl RefUnwindSafe for MapTileDescriptor
impl Send for MapTileDescriptor
impl Sync for MapTileDescriptor
impl Unpin for MapTileDescriptor
impl UnwindSafe for MapTileDescriptor
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