pub struct MaterialProperty { /* private fields */ }Expand description
Wraps the corresponding Model I/O material property counterpart.
Implementations§
Source§impl MaterialProperty
impl MaterialProperty
Sourcepub fn new(name: &str, semantic: MaterialSemantic) -> Result<Self>
pub fn new(name: &str, semantic: MaterialSemantic) -> Result<Self>
Wraps the corresponding Model I/O initializer for the wrapped Model I/O material property 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 property 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 property counterpart.
Sourcepub fn info(&self) -> Result<MaterialPropertyInfo>
pub fn info(&self) -> Result<MaterialPropertyInfo>
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn texture(&self) -> Option<Texture>
pub fn texture(&self) -> Option<Texture>
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn texture_sampler(&self) -> Option<TextureSampler>
pub fn texture_sampler(&self) -> Option<TextureSampler>
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_texture_sampler(&self, sampler: Option<&TextureSampler>)
pub fn set_texture_sampler(&self, sampler: Option<&TextureSampler>)
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_float(&self, value: f32)
pub fn set_float(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_float2(&self, value: [f32; 2])
pub fn set_float2(&self, value: [f32; 2])
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_float3(&self, value: [f32; 3])
pub fn set_float3(&self, value: [f32; 3])
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_float4(&self, value: [f32; 4])
pub fn set_float4(&self, value: [f32; 4])
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_matrix4x4(&self, value: [f32; 16])
pub fn set_matrix4x4(&self, value: [f32; 16])
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_string(&self, value: Option<&str>) -> Result<()>
pub fn set_string(&self, value: Option<&str>) -> Result<()>
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_url(&self, path: Option<impl AsRef<Path>>) -> Result<()>
pub fn set_url(&self, path: Option<impl AsRef<Path>>) -> Result<()>
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_color(&self, color: [f32; 4])
pub fn set_color(&self, color: [f32; 4])
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Sourcepub fn set_luminance(&self, value: f32)
pub fn set_luminance(&self, value: f32)
Calls the corresponding Model I/O method on the wrapped Model I/O material property counterpart.
Trait Implementations§
Source§impl Clone for MaterialProperty
impl Clone for MaterialProperty
Source§fn clone(&self) -> MaterialProperty
fn clone(&self) -> MaterialProperty
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more