pub struct TileVariation { /* private fields */ }Expand description
A visual variation for terrain tiles.
Tile variations define different appearances for tiles, including height, scale, normal mapping, blending, and color tinting. This allows for more diverse and natural-looking terrain.
Implementations§
Source§impl TileVariation
impl TileVariation
Sourcepub fn serialise_version(&self) -> &u16
pub fn serialise_version(&self) -> &u16
Serialization version for this structure.
Sourcepub fn min_height(&self) -> &f32
pub fn min_height(&self) -> &f32
Minimum height at which this variation appears.
Sourcepub fn normal_strength(&self) -> &f32
pub fn normal_strength(&self) -> &f32
Strength of normal mapping for surface detail.
Sourcepub fn overlap_border_size(&self) -> &f32
pub fn overlap_border_size(&self) -> &f32
Size of the overlap border for blending with adjacent tiles.
Sourcepub fn raw_data_tri_density(&self) -> &u32
pub fn raw_data_tri_density(&self) -> &u32
Triangle density for raw terrain data.
Sourcepub fn blend_common(&self) -> &String
pub fn blend_common(&self) -> &String
Path to the common blend texture.
Sourcepub fn index_common(&self) -> &String
pub fn index_common(&self) -> &String
Path to the common index texture.
Sourcepub fn normal_common(&self) -> &String
pub fn normal_common(&self) -> &String
Path to the common normal map texture.
Source§impl TileVariation
impl TileVariation
Sourcepub fn serialise_version_mut(&mut self) -> &mut u16
pub fn serialise_version_mut(&mut self) -> &mut u16
Serialization version for this structure.
Sourcepub fn location_mut(&mut self) -> &mut String
pub fn location_mut(&mut self) -> &mut String
Path or identifier for this variation’s location.
Sourcepub fn min_height_mut(&mut self) -> &mut f32
pub fn min_height_mut(&mut self) -> &mut f32
Minimum height at which this variation appears.
Sourcepub fn normal_strength_mut(&mut self) -> &mut f32
pub fn normal_strength_mut(&mut self) -> &mut f32
Strength of normal mapping for surface detail.
Sourcepub fn overlap_border_size_mut(&mut self) -> &mut f32
pub fn overlap_border_size_mut(&mut self) -> &mut f32
Size of the overlap border for blending with adjacent tiles.
Sourcepub fn raw_data_tri_density_mut(&mut self) -> &mut u32
pub fn raw_data_tri_density_mut(&mut self) -> &mut u32
Triangle density for raw terrain data.
Sourcepub fn blend_common_mut(&mut self) -> &mut String
pub fn blend_common_mut(&mut self) -> &mut String
Path to the common blend texture.
Sourcepub fn index_common_mut(&mut self) -> &mut String
pub fn index_common_mut(&mut self) -> &mut String
Path to the common index texture.
Sourcepub fn normal_common_mut(&mut self) -> &mut String
pub fn normal_common_mut(&mut self) -> &mut String
Path to the common normal map texture.
Sourcepub fn barbarian_mut(&mut self) -> &mut bool
pub fn barbarian_mut(&mut self) -> &mut bool
Whether this variation uses the “barbarian” terrain style.
Source§impl TileVariation
impl TileVariation
Sourcepub fn set_serialise_version(&mut self, val: u16) -> &mut Self
pub fn set_serialise_version(&mut self, val: u16) -> &mut Self
Serialization version for this structure.
Sourcepub fn set_location(&mut self, val: String) -> &mut Self
pub fn set_location(&mut self, val: String) -> &mut Self
Path or identifier for this variation’s location.
Sourcepub fn set_min_height(&mut self, val: f32) -> &mut Self
pub fn set_min_height(&mut self, val: f32) -> &mut Self
Minimum height at which this variation appears.
Sourcepub fn set_normal_strength(&mut self, val: f32) -> &mut Self
pub fn set_normal_strength(&mut self, val: f32) -> &mut Self
Strength of normal mapping for surface detail.
Sourcepub fn set_overlap_border_size(&mut self, val: f32) -> &mut Self
pub fn set_overlap_border_size(&mut self, val: f32) -> &mut Self
Size of the overlap border for blending with adjacent tiles.
Sourcepub fn set_raw_data_tri_density(&mut self, val: u32) -> &mut Self
pub fn set_raw_data_tri_density(&mut self, val: u32) -> &mut Self
Triangle density for raw terrain data.
Sourcepub fn set_blend_common(&mut self, val: String) -> &mut Self
pub fn set_blend_common(&mut self, val: String) -> &mut Self
Path to the common blend texture.
Sourcepub fn set_index_common(&mut self, val: String) -> &mut Self
pub fn set_index_common(&mut self, val: String) -> &mut Self
Path to the common index texture.
Sourcepub fn set_normal_common(&mut self, val: String) -> &mut Self
pub fn set_normal_common(&mut self, val: String) -> &mut Self
Path to the common normal map texture.
Sourcepub fn set_green(&mut self, val: f32) -> &mut Self
pub fn set_green(&mut self, val: f32) -> &mut Self
Green component of the color tint (0.0-1.0).
Sourcepub fn set_barbarian(&mut self, val: bool) -> &mut Self
pub fn set_barbarian(&mut self, val: bool) -> &mut Self
Whether this variation uses the “barbarian” terrain style.
Trait Implementations§
Source§impl Clone for TileVariation
impl Clone for TileVariation
Source§fn clone(&self) -> TileVariation
fn clone(&self) -> TileVariation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TileVariation
impl Debug for TileVariation
Source§impl Decodeable for TileVariation
impl Decodeable for TileVariation
Source§impl Default for TileVariation
impl Default for TileVariation
Source§fn default() -> TileVariation
fn default() -> TileVariation
Source§impl<'de> Deserialize<'de> for TileVariation
impl<'de> Deserialize<'de> for TileVariation
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 Encodeable for TileVariation
impl Encodeable for TileVariation
Source§fn encode<W: WriteBytes>(
&mut self,
buffer: &mut W,
extra_data: &Option<EncodeableExtraData<'_>>,
) -> Result<()>
fn encode<W: WriteBytes>( &mut self, buffer: &mut W, extra_data: &Option<EncodeableExtraData<'_>>, ) -> Result<()>
Source§impl PartialEq for TileVariation
impl PartialEq for TileVariation
Source§impl Serialize for TileVariation
impl Serialize for TileVariation
impl StructuralPartialEq for TileVariation
Auto Trait Implementations§
impl Freeze for TileVariation
impl RefUnwindSafe for TileVariation
impl Send for TileVariation
impl Sync for TileVariation
impl Unpin for TileVariation
impl UnsafeUnpin for TileVariation
impl UnwindSafe for TileVariation
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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().impl<T> Scalar for T
§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.