#[non_exhaustive]pub enum Material {
Show 18 variants
LightMappedGeneric(LightMappedGenericMaterial),
VertexLitGeneric(VertexLitGenericMaterial),
VertexLitGenericDx6(VertexLitGenericMaterial),
UnlitGeneric(UnlitGenericMaterial),
UnlitTwoTexture(UnlitTwoTextureMaterial),
Water(WaterMaterial),
WorldVertexTransition(WorldVertexTransitionMaterial),
EyeRefract(EyeRefractMaterial),
SubRect(SubRectMaterial),
Sprite(SpriteMaterial),
SpriteCard(SpriteCardMaterial),
Cable(CableMaterial),
Refract(RefractMaterial),
Modulate(ModulateMaterial),
DecalModulate(ModulateMaterial),
Sky(SkyMaterial),
Replacements(ReplacementsMaterial),
Patch(PatchMaterial),
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
LightMappedGeneric(LightMappedGenericMaterial)
VertexLitGeneric(VertexLitGenericMaterial)
VertexLitGenericDx6(VertexLitGenericMaterial)
UnlitGeneric(UnlitGenericMaterial)
UnlitTwoTexture(UnlitTwoTextureMaterial)
Water(WaterMaterial)
WorldVertexTransition(WorldVertexTransitionMaterial)
EyeRefract(EyeRefractMaterial)
SubRect(SubRectMaterial)
Sprite(SpriteMaterial)
SpriteCard(SpriteCardMaterial)
Cable(CableMaterial)
Refract(RefractMaterial)
Modulate(ModulateMaterial)
DecalModulate(ModulateMaterial)
Sky(SkyMaterial)
Replacements(ReplacementsMaterial)
Patch(PatchMaterial)
Implementations§
Source§impl Material
impl Material
Sourcepub fn resolve<E, Loader>(self, loader: Loader) -> Result<Material, E>
pub fn resolve<E, Loader>(self, loader: Loader) -> Result<Material, E>
If the material is a patch, apply it to the included material
pub fn translucent(&self) -> bool
pub fn no_cull(&self) -> bool
pub fn alpha_test(&self) -> Option<f32>
pub fn base_texture(&self) -> Option<&str>
pub fn base_texture_transform(&self) -> Option<&TextureTransform>
pub fn bump_map(&self) -> Option<&str>
pub fn surface_prop(&self) -> Option<&str>
pub fn alpha(&self) -> f32
pub fn ignore_z_test(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Material
impl<'de> Deserialize<'de> for Material
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 Material
impl RefUnwindSafe for Material
impl Send for Material
impl Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
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