Struct veloren_common::terrain::TerrainChunkMeta
source · pub struct TerrainChunkMeta {Show 18 fields
name: Option<String>,
biome: BiomeKind,
alt: f32,
tree_density: f32,
contains_cave: bool,
contains_river: bool,
near_water: bool,
river_velocity: Vec3<f32>,
approx_chunk_terrain_normal: Option<Vec3<f32>>,
rockiness: f32,
cliff_height: f32,
temp: f32,
humidity: f32,
site: Option<SiteKindMeta>,
tracks: Vec<CubicBezier3<f32>>,
debug_points: Vec<Vec3<f32>>,
debug_lines: Vec<LineSegment3<f32>>,
sprite_cfgs: HashMap<Vec3<i32>, SpriteCfg>,
}
Fields§
§name: Option<String>
§biome: BiomeKind
§alt: f32
§tree_density: f32
§contains_cave: bool
§contains_river: bool
§near_water: bool
§river_velocity: Vec3<f32>
§approx_chunk_terrain_normal: Option<Vec3<f32>>
§rockiness: f32
§cliff_height: f32
§temp: f32
§humidity: f32
§site: Option<SiteKindMeta>
§tracks: Vec<CubicBezier3<f32>>
§debug_points: Vec<Vec3<f32>>
§debug_lines: Vec<LineSegment3<f32>>
§sprite_cfgs: HashMap<Vec3<i32>, SpriteCfg>
Implementations§
source§impl TerrainChunkMeta
impl TerrainChunkMeta
pub fn new( name: Option<String>, biome: BiomeKind, alt: f32, tree_density: f32, contains_cave: bool, contains_river: bool, near_water: bool, river_velocity: Vec3<f32>, temp: f32, humidity: f32, site: Option<SiteKindMeta>, approx_chunk_terrain_normal: Option<Vec3<f32>>, rockiness: f32, cliff_height: f32, ) -> Self
pub fn void() -> Self
pub fn name(&self) -> Option<&str>
pub fn biome(&self) -> BiomeKind
pub fn tree_density(&self) -> f32
pub fn contains_cave(&self) -> bool
pub fn contains_river(&self) -> bool
pub fn near_water(&self) -> bool
pub fn river_velocity(&self) -> Vec3<f32>
pub fn site(&self) -> Option<SiteKindMeta>
pub fn humidity(&self) -> f32
pub fn tracks(&self) -> &[CubicBezier3<f32>]
pub fn add_track(&mut self, bezier: CubicBezier3<f32>)
pub fn debug_points(&self) -> &[Vec3<f32>]
pub fn add_debug_point(&mut self, point: Vec3<f32>)
pub fn debug_lines(&self) -> &[LineSegment3<f32>]
pub fn add_debug_line(&mut self, line: LineSegment3<f32>)
pub fn sprite_cfg_at(&self, rpos: Vec3<i32>) -> Option<&SpriteCfg>
pub fn set_sprite_cfg_at(&mut self, rpos: Vec3<i32>, sprite_cfg: SpriteCfg)
pub fn approx_chunk_terrain_normal(&self) -> Option<Vec3<f32>>
pub fn rockiness(&self) -> f32
pub fn cliff_height(&self) -> f32
Trait Implementations§
source§impl Clone for TerrainChunkMeta
impl Clone for TerrainChunkMeta
source§fn clone(&self) -> TerrainChunkMeta
fn clone(&self) -> TerrainChunkMeta
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 TerrainChunkMeta
impl Debug for TerrainChunkMeta
source§impl<'de> Deserialize<'de> for TerrainChunkMeta
impl<'de> Deserialize<'de> for TerrainChunkMeta
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
Auto Trait Implementations§
impl Freeze for TerrainChunkMeta
impl RefUnwindSafe for TerrainChunkMeta
impl Send for TerrainChunkMeta
impl Sync for TerrainChunkMeta
impl Unpin for TerrainChunkMeta
impl UnwindSafe for TerrainChunkMeta
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<C, M> ConvertSaveload<M> for C
impl<C, M> ConvertSaveload<M> for C
§type Error = Infallible
type Error = Infallible
Error may occur during serialization or deserialization of component
§fn convert_into<F>(
&self,
_: F,
) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
fn convert_into<F>( &self, _: F, ) -> Result<<C as ConvertSaveload<M>>::Data, <C as ConvertSaveload<M>>::Error>
Convert this data type into serializable form (
Data
) using
entity to marker mapping function§fn convert_from<F>(
data: <C as ConvertSaveload<M>>::Data,
_: F,
) -> Result<C, <C as ConvertSaveload<M>>::Error>
fn convert_from<F>( data: <C as ConvertSaveload<M>>::Data, _: F, ) -> Result<C, <C as ConvertSaveload<M>>::Error>
Convert this data from a deserializable form (
Data
) using
entity to marker mapping function§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