Enum sark_grids::world_grid::WorldSpace
source · pub enum WorldSpace {
Units,
Pixels,
}
Expand description
How world space is defined.
This is used when converting between positions and tile indices.
Variants§
Units
With this setting the size of all tiles is exactly one world unit.
When world space is defined by world units, pixels_per_tile
determines
how many pixels fit vertically in a single world unit.
Pixels
With this setting the size of all tiles in world units is equal to
pixels_per_tile
.
This matches the defaults for bevy’s built in orthographic camera where one world unit == one pixel.
Implementations§
source§impl WorldSpace
impl WorldSpace
sourcepub fn other(&self) -> Self
pub fn other(&self) -> Self
Return the opposite of this WorldSpace
.
Trait Implementations§
source§impl Clone for WorldSpace
impl Clone for WorldSpace
source§fn clone(&self) -> WorldSpace
fn clone(&self) -> WorldSpace
Returns a copy 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 WorldSpace
impl Debug for WorldSpace
source§impl PartialEq for WorldSpace
impl PartialEq for WorldSpace
source§fn eq(&self, other: &WorldSpace) -> bool
fn eq(&self, other: &WorldSpace) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for WorldSpace
impl Eq for WorldSpace
impl StructuralPartialEq for WorldSpace
Auto Trait Implementations§
impl Freeze for WorldSpace
impl RefUnwindSafe for WorldSpace
impl Send for WorldSpace
impl Sync for WorldSpace
impl Unpin for WorldSpace
impl UnwindSafe for WorldSpace
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