pub struct Material { /* private fields */ }Expand description
Wraps the corresponding Model I/O material counterpart.
Implementations§
Source§impl Material
impl Material
Sourcepub fn new(name: &str, physically_plausible: bool) -> Result<Self>
pub fn new(name: &str, physically_plausible: bool) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O material counterpart.
Sourcepub fn info(&self) -> Result<MaterialInfo>
pub fn info(&self) -> Result<MaterialInfo>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn count(&self) -> usize
pub fn count(&self) -> usize
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn name(&self) -> Option<String>
pub fn name(&self) -> Option<String>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn set_name(&self, name: &str) -> Result<()>
pub fn set_name(&self, name: &str) -> Result<()>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn material_face(&self) -> Option<MaterialFace>
pub fn material_face(&self) -> Option<MaterialFace>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn set_material_face(&self, face: MaterialFace)
pub fn set_material_face(&self, face: MaterialFace)
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn remove_all_properties(&self)
pub fn remove_all_properties(&self)
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn load_textures_using_resolver(&self, resolver: &AssetResolver)
pub fn load_textures_using_resolver(&self, resolver: &AssetResolver)
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn property(&self, index: usize) -> Option<MaterialProperty>
pub fn property(&self, index: usize) -> Option<MaterialProperty>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn property_named(&self, name: &str) -> Result<Option<MaterialProperty>>
pub fn property_named(&self, name: &str) -> Result<Option<MaterialProperty>>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn property_with_semantic(
&self,
semantic: MaterialSemantic,
) -> Option<MaterialProperty>
pub fn property_with_semantic( &self, semantic: MaterialSemantic, ) -> Option<MaterialProperty>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.
Sourcepub fn properties(&self) -> Vec<MaterialProperty>
pub fn properties(&self) -> Vec<MaterialProperty>
Calls the corresponding Model I/O method on the wrapped Model I/O material counterpart.