Trait Material

Source
pub trait Material: Debug {
Show 14 methods // Required methods fn get_ambient(&self) -> Option<&MaterialComponent>; fn get_diffuse(&self) -> Option<&MaterialComponent>; fn get_specular(&self) -> Option<&MaterialComponent>; fn get_specular_power(&self) -> Option<&MaterialComponent>; fn get_albedo(&self) -> Option<&MaterialComponent>; fn get_ao(&self) -> Option<&MaterialComponent>; fn get_displacement(&self) -> Option<&MaterialComponent>; fn get_roughness(&self) -> Option<&MaterialComponent>; fn get_metalness(&self) -> Option<&MaterialComponent>; fn get_normal(&self) -> Option<&MaterialComponent>; fn get_emissive(&self) -> Option<&MaterialComponent>; fn get_names(&self) -> BTreeSet<String>; fn get_by_name(&self, name: &str) -> Option<&MaterialComponent>; fn set_by_name(&mut self, name: &str, texture: MaterialComponent);
}
Expand description

The Material trait helps the MaterialLegacy struct or the MaterialPbr struct to be able to turn into an object

Required Methods§

Source

fn get_ambient(&self) -> Option<&MaterialComponent>

Get the ambient color

Source

fn get_diffuse(&self) -> Option<&MaterialComponent>

Get the diffuse color

Source

fn get_specular(&self) -> Option<&MaterialComponent>

Get the specular color

Source

fn get_specular_power(&self) -> Option<&MaterialComponent>

Get the specular power

Source

fn get_albedo(&self) -> Option<&MaterialComponent>

Get the base color (PBR)

Source

fn get_ao(&self) -> Option<&MaterialComponent>

Get the ambient occlusion (PBR)

Source

fn get_displacement(&self) -> Option<&MaterialComponent>

Get the displacement map (A.k.a. height map) (PBR)

Source

fn get_roughness(&self) -> Option<&MaterialComponent>

Get the roughness map (PBR)

Source

fn get_metalness(&self) -> Option<&MaterialComponent>

Get the metalness map (PBR)

Source

fn get_normal(&self) -> Option<&MaterialComponent>

Get the normal map

Source

fn get_emissive(&self) -> Option<&MaterialComponent>

Get the emissive color

Source

fn get_names(&self) -> BTreeSet<String>

Get all of the component names exists in this material

Source

fn get_by_name(&self, name: &str) -> Option<&MaterialComponent>

Get a component by the name of the component

Source

fn set_by_name(&mut self, name: &str, texture: MaterialComponent)

Set a componnet by the name of the component

Implementors§