Struct veloren_common::terrain::map::MapSample
source · pub struct MapSample {
pub rgb: Rgb<u8>,
pub alt: f64,
pub downhill_wpos: Vec2<i32>,
pub connections: Option<[Option<Connection>; 8]>,
}
Expand description
Per-chunk data the map needs to be able to sample in order to correctly render.
Fields§
§rgb: Rgb<u8>
the base RGB color for a particular map pixel using the current settings (i.e. the color without lighting).
alt: f64
Surface altitude information (correctly reflecting settings like is_basement and is_water)
downhill_wpos: Vec2<i32>
Downhill chunk (may not be meaningful on ocean tiles, or at least edge tiles)
connections: Option<[Option<Connection>; 8]>
Connection information about any connections to/from this chunk (e.g. rivers).
Connections at each index correspond to the same index in NEIGHBOR_DELTA.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MapSample
impl RefUnwindSafe for MapSample
impl Send for MapSample
impl Sync for MapSample
impl Unpin for MapSample
impl UnwindSafe for MapSample
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more