Struct ark_api::render::RenderMaterialBuilder
source · [−]pub struct RenderMaterialBuilder { /* private fields */ }
Expand description
Create RenderMaterial
through builder pattern
Implementations
sourceimpl RenderMaterialBuilder
impl RenderMaterialBuilder
sourcepub fn with_diffuse_albedo(&mut self, albedo: Vec3) -> &mut Self
pub fn with_diffuse_albedo(&mut self, albedo: Vec3) -> &mut Self
Set diffuse albedo color. Default is Vec3::ONE
sourcepub fn with_alpha(&mut self, alpha: f32) -> &mut Self
pub fn with_alpha(&mut self, alpha: f32) -> &mut Self
Set the transparency. Default is 1.0
sourcepub fn with_emissive_color(&mut self, color: Vec3) -> &mut Self
pub fn with_emissive_color(&mut self, color: Vec3) -> &mut Self
Set emissive color (can exceed Vec3::ONE
). Default is Vec3::ZERO
.
sourcepub fn with_roughness(&mut self, perceptual_roughness: f32) -> &mut Self
pub fn with_roughness(&mut self, perceptual_roughness: f32) -> &mut Self
Set the perceptual roughness
sourcepub fn with_metallic(&mut self, metallic: f32) -> &mut Self
pub fn with_metallic(&mut self, metallic: f32) -> &mut Self
Set the metallicness
sourcepub fn build(&self) -> RenderMaterial
pub fn build(&self) -> RenderMaterial
Builds material
Trait Implementations
sourceimpl Clone for RenderMaterialBuilder
impl Clone for RenderMaterialBuilder
sourcefn clone(&self) -> RenderMaterialBuilder
fn clone(&self) -> RenderMaterialBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RenderMaterialBuilder
impl Debug for RenderMaterialBuilder
sourceimpl Default for RenderMaterialBuilder
impl Default for RenderMaterialBuilder
sourcefn default() -> RenderMaterialBuilder
fn default() -> RenderMaterialBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for RenderMaterialBuilder
impl Send for RenderMaterialBuilder
impl Sync for RenderMaterialBuilder
impl Unpin for RenderMaterialBuilder
impl UnwindSafe for RenderMaterialBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more