Enum game_library::enums::biome::Marker
source · pub enum Marker {
Show 21 variants
Empty,
Elevation0,
Elevation1,
Elevation2,
Elevation3,
Elevation4,
Elevation5,
Elevation6,
Elevation7,
Elevation8,
Elevation9,
Elevation10,
Elevation11,
Elevation12,
Elevation13,
Elevation14,
Elevation15,
Elevation16,
Elevation17,
Elevation18,
Elevation19,
}
Expand description
A base biome enum. This is then further used with the type of primal realm to determine the actual biome. This biome is set by the noise generator, and it describes the “height” of the terrain, and that should then be interpreted later (see the implementations for this enum) to determine the actual biome.
Supports maps with up to 10 different biomes.
Variants§
Empty
An empty marker.
Elevation0
The lowest elevation
Elevation1
The second lowest possible biome.
Elevation2
The third lowest possible biome.
Elevation3
The fourth lowest possible biome.
Elevation4
The fifth lowest possible biome.
Elevation5
The sixth lowest possible biome.
Elevation6
The seventh lowest possible biome.
Elevation7
The eighth lowest possible biome.
Elevation8
The ninth lowest possible biome.
Elevation9
The tenth lowest possible biome.
Elevation10
The 11th lowest possible biome.
Elevation11
The 12th lowest possible biome.
Elevation12
The 13th lowest possible biome.
Elevation13
The 14th lowest possible biome.
Elevation14
The 15th lowest possible biome.
Elevation15
The 16th lowest possible biome.
Elevation16
The 17th lowest possible biome.
Elevation17
The 18th lowest possible biome.
Elevation18
The 19th lowest possible biome.
Elevation19
The 20th lowest possible biome.
Implementations§
source§impl Marker
impl Marker
sourcepub const fn as_elevation_idx(&self) -> usize
pub const fn as_elevation_idx(&self) -> usize
Convert the marker into an elevation value. If the marker is Empty
, then
the elevation is 0. Otherwise, the elevation is the marker as an integer
which matches the Marker::Elevation1
variant.
Returns
The elevation value of the marker.
sourcepub fn from_noise(noise: f64) -> Self
pub fn from_noise(noise: f64) -> Self
Trait Implementations§
source§impl<'de> Deserialize<'de> for Marker
impl<'de> Deserialize<'de> for Marker
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>,
source§impl Ord for Marker
impl Ord for Marker
source§impl PartialEq for Marker
impl PartialEq for Marker
source§impl PartialOrd for Marker
impl PartialOrd for Marker
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Marker
impl Eq for Marker
impl StructuralEq for Marker
impl StructuralPartialEq for Marker
Auto Trait Implementations§
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnwindSafe for Marker
Blanket Implementations§
§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
T
[ShaderType
] for self
. When used in [AsBindGroup
]
derives, it is safe to assume that all images in self
exist.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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Self
using data from the given [World
].§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>
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<Ok, Error>
source§impl<T> Serialize for T
impl<T> Serialize for T
fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>
fn do_erased_serialize( &self, serializer: &mut dyn Serializer ) -> Result<(), ErrorImpl>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.