Struct veloren_client::WorldData
source · pub struct WorldData {
pub lod_base: Grid<u32>,
pub lod_alt: Grid<u32>,
pub lod_horizon: Grid<u32>,
pub(crate) map: (Vec<Arc<DynamicImage>>, Vec2<u16>, Vec2<f32>),
}
Fields§
§lod_base: Grid<u32>
Just the “base” layer for LOD; currently includes colors and nothing else. In the future we’ll add more layers, like shadows, rivers, and probably foliage, cities, roads, and other structures.
lod_alt: Grid<u32>
The “height” layer for LOD; currently includes only land altitudes, but in the future should also water depth, and probably other information as well.
lod_horizon: Grid<u32>
The “shadow” layer for LOD. Includes east and west horizon angles and an approximate max occluder height, which we use to try to approximate soft and volumetric shadows.
map: (Vec<Arc<DynamicImage>>, Vec2<u16>, Vec2<f32>)
A fully rendered map image for use with the map and minimap; note that this can be constructed dynamically by combining the layers of world map data (e.g. with shadow map data or river data), but at present we opt not to do this.
The first two elements of the tuple are the regular and topographic maps respectively. The third element of the tuple is the world size (as a 2D grid, in chunks), and the fourth element holds the minimum height for any land chunk (i.e. the sea level) in its x coordinate, and the maximum land height above this height (i.e. the max height) in its y coordinate.
Implementations§
source§impl WorldData
impl WorldData
pub fn chunk_size(&self) -> Vec2<u16>
pub fn map_layers(&self) -> &Vec<Arc<DynamicImage>>
pub fn map_image(&self) -> &Arc<DynamicImage>
pub fn topo_map_image(&self) -> &Arc<DynamicImage>
pub fn min_chunk_alt(&self) -> f32
pub fn max_chunk_alt(&self) -> f32
Auto Trait Implementations§
impl Freeze for WorldData
impl RefUnwindSafe for WorldData
impl Send for WorldData
impl Sync for WorldData
impl Unpin for WorldData
impl UnwindSafe for WorldData
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
§impl<T> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self
file descriptor.§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
§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>
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>
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