pub struct Texture { /* private fields */ }Expand description
A terrain texture with material properties.
Defines surface rendering properties including reflectivity and smoothness values at different interpolation points.
Implementations§
Source§impl Texture
impl Texture
Sourcepub fn serialise_version(&self) -> &u16
pub fn serialise_version(&self) -> &u16
Serialisation format version.
Sourcepub fn mid_distance_strength(&self) -> &f32
pub fn mid_distance_strength(&self) -> &f32
Mid-distance detail strength.
Sourcepub fn lerp_reflectivity0(&self) -> &f32
pub fn lerp_reflectivity0(&self) -> &f32
Reflectivity at lerp point 0.
Sourcepub fn lerp_smoothness0(&self) -> &f32
pub fn lerp_smoothness0(&self) -> &f32
Smoothness at lerp point 0.
Sourcepub fn lerp_reflectivity1(&self) -> &f32
pub fn lerp_reflectivity1(&self) -> &f32
Reflectivity at lerp point 1.
Sourcepub fn lerp_smoothness1(&self) -> &f32
pub fn lerp_smoothness1(&self) -> &f32
Smoothness at lerp point 1.
Sourcepub fn lerp_reflectivity2(&self) -> &f32
pub fn lerp_reflectivity2(&self) -> &f32
Reflectivity at lerp point 2.
Sourcepub fn lerp_smoothness2(&self) -> &f32
pub fn lerp_smoothness2(&self) -> &f32
Smoothness at lerp point 2.
Sourcepub fn lerp_reflectivity3(&self) -> &f32
pub fn lerp_reflectivity3(&self) -> &f32
Reflectivity at lerp point 3.
Sourcepub fn lerp_smoothness3(&self) -> &f32
pub fn lerp_smoothness3(&self) -> &f32
Smoothness at lerp point 3.
Sourcepub fn blend_pixel_scale(&self) -> &f32
pub fn blend_pixel_scale(&self) -> &f32
Pixel scale for texture blending.
Sourcepub fn outfield_blend_pixel_scale(&self) -> &f32
pub fn outfield_blend_pixel_scale(&self) -> &f32
Pixel scale for outfield blending.
Source§impl Texture
impl Texture
Sourcepub fn serialise_version_mut(&mut self) -> &mut u16
pub fn serialise_version_mut(&mut self) -> &mut u16
Serialisation format version.
Sourcepub fn mid_distance_strength_mut(&mut self) -> &mut f32
pub fn mid_distance_strength_mut(&mut self) -> &mut f32
Mid-distance detail strength.
Sourcepub fn lerp_reflectivity0_mut(&mut self) -> &mut f32
pub fn lerp_reflectivity0_mut(&mut self) -> &mut f32
Reflectivity at lerp point 0.
Sourcepub fn lerp_smoothness0_mut(&mut self) -> &mut f32
pub fn lerp_smoothness0_mut(&mut self) -> &mut f32
Smoothness at lerp point 0.
Sourcepub fn lerp_reflectivity1_mut(&mut self) -> &mut f32
pub fn lerp_reflectivity1_mut(&mut self) -> &mut f32
Reflectivity at lerp point 1.
Sourcepub fn lerp_smoothness1_mut(&mut self) -> &mut f32
pub fn lerp_smoothness1_mut(&mut self) -> &mut f32
Smoothness at lerp point 1.
Sourcepub fn lerp_reflectivity2_mut(&mut self) -> &mut f32
pub fn lerp_reflectivity2_mut(&mut self) -> &mut f32
Reflectivity at lerp point 2.
Sourcepub fn lerp_smoothness2_mut(&mut self) -> &mut f32
pub fn lerp_smoothness2_mut(&mut self) -> &mut f32
Smoothness at lerp point 2.
Sourcepub fn lerp_reflectivity3_mut(&mut self) -> &mut f32
pub fn lerp_reflectivity3_mut(&mut self) -> &mut f32
Reflectivity at lerp point 3.
Sourcepub fn lerp_smoothness3_mut(&mut self) -> &mut f32
pub fn lerp_smoothness3_mut(&mut self) -> &mut f32
Smoothness at lerp point 3.
Sourcepub fn blend_pixel_scale_mut(&mut self) -> &mut f32
pub fn blend_pixel_scale_mut(&mut self) -> &mut f32
Pixel scale for texture blending.
Sourcepub fn outfield_blend_pixel_scale_mut(&mut self) -> &mut f32
pub fn outfield_blend_pixel_scale_mut(&mut self) -> &mut f32
Pixel scale for outfield blending.
Source§impl Texture
impl Texture
Sourcepub fn set_serialise_version(&mut self, val: u16) -> &mut Self
pub fn set_serialise_version(&mut self, val: u16) -> &mut Self
Serialisation format version.
Sourcepub fn set_mid_distance_strength(&mut self, val: f32) -> &mut Self
pub fn set_mid_distance_strength(&mut self, val: f32) -> &mut Self
Mid-distance detail strength.
Sourcepub fn set_lerp_reflectivity0(&mut self, val: f32) -> &mut Self
pub fn set_lerp_reflectivity0(&mut self, val: f32) -> &mut Self
Reflectivity at lerp point 0.
Sourcepub fn set_lerp_smoothness0(&mut self, val: f32) -> &mut Self
pub fn set_lerp_smoothness0(&mut self, val: f32) -> &mut Self
Smoothness at lerp point 0.
Sourcepub fn set_lerp_reflectivity1(&mut self, val: f32) -> &mut Self
pub fn set_lerp_reflectivity1(&mut self, val: f32) -> &mut Self
Reflectivity at lerp point 1.
Sourcepub fn set_lerp_smoothness1(&mut self, val: f32) -> &mut Self
pub fn set_lerp_smoothness1(&mut self, val: f32) -> &mut Self
Smoothness at lerp point 1.
Sourcepub fn set_lerp_reflectivity2(&mut self, val: f32) -> &mut Self
pub fn set_lerp_reflectivity2(&mut self, val: f32) -> &mut Self
Reflectivity at lerp point 2.
Sourcepub fn set_lerp_smoothness2(&mut self, val: f32) -> &mut Self
pub fn set_lerp_smoothness2(&mut self, val: f32) -> &mut Self
Smoothness at lerp point 2.
Sourcepub fn set_lerp_reflectivity3(&mut self, val: f32) -> &mut Self
pub fn set_lerp_reflectivity3(&mut self, val: f32) -> &mut Self
Reflectivity at lerp point 3.
Sourcepub fn set_lerp_smoothness3(&mut self, val: f32) -> &mut Self
pub fn set_lerp_smoothness3(&mut self, val: f32) -> &mut Self
Smoothness at lerp point 3.
Sourcepub fn set_blend_pixel_scale(&mut self, val: f32) -> &mut Self
pub fn set_blend_pixel_scale(&mut self, val: f32) -> &mut Self
Pixel scale for texture blending.
Sourcepub fn set_outfield_blend_pixel_scale(&mut self, val: f32) -> &mut Self
pub fn set_outfield_blend_pixel_scale(&mut self, val: f32) -> &mut Self
Pixel scale for outfield blending.
Trait Implementations§
Source§impl Decodeable for Texture
impl Decodeable for Texture
Source§impl<'de> Deserialize<'de> for Texture
impl<'de> Deserialize<'de> for Texture
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 Texture
impl Encodeable for Texture
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<()>
impl StructuralPartialEq for Texture
Auto Trait Implementations§
impl Freeze for Texture
impl RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl UnsafeUnpin for Texture
impl UnwindSafe for Texture
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.