Struct rin_scene::renderer::MaterialPool[][src]

pub struct MaterialPool<M: Key = MaterialRef> { /* fields omitted */ }

Implementations

impl MaterialPool<MaterialRef>[src]

pub fn new(
    unified_material_ubo: bool,
    world: &mut DeferredScene,
    gl: &Renderer<'_>
) -> MaterialPool<MaterialRef>
[src]

impl MaterialPool<ShadowMaterialRef>[src]

pub fn new_shadows(
    unified_material_ubo: bool,
    world: &mut DeferredScene,
    gl: &Renderer<'_>
) -> MaterialPool<ShadowMaterialRef>
[src]

impl<M: Key + Copy + 'static> MaterialPool<M>[src]

pub fn register_material<F: FullMaterial + 'static>(
    &mut self,
    name: &str,
    material: F
) -> M
[src]

pub fn remove(&mut self, material: M)[src]

pub fn find_material(&self, name: &str) -> Option<M>[src]

pub fn material_name(&self, materialref: M) -> Option<&str>[src]

pub fn dyn_materials(&self) -> impl Iterator<Item = &dyn Material>[src]

pub fn iter_dyn(&self) -> impl Iterator<Item = (M, &dyn Material)>[src]

pub fn materials<F: FullMaterial>(&self) -> impl Iterator<Item = &F>[src]

pub fn named_materials<F: FullMaterial>(
    &self
) -> impl Iterator<Item = (String, &F)>
[src]

pub fn iter<F: FullMaterial>(&self) -> impl Iterator<Item = (M, &F)>[src]

pub fn named_iter<F: FullMaterial>(
    &self
) -> impl Iterator<Item = (String, M, &F)>
[src]

pub fn materials_mut<F: FullMaterial>(&mut self) -> impl Iterator<Item = &mut F>[src]

pub fn named_materials_mut<F: FullMaterial>(
    &mut self
) -> impl Iterator<Item = (String, &mut F)>
[src]

pub fn iter_mut<F: FullMaterial>(&mut self) -> impl Iterator<Item = (M, &mut F)>[src]

pub fn named_iter_mut<F: FullMaterial>(
    &mut self
) -> impl Iterator<Item = (String, M, &mut F)>
[src]

pub fn material<F: FullMaterial>(&self, materialref: M) -> Option<&F>[src]

pub fn material_mut<F: FullMaterial>(
    &mut self,
    materialref: M
) -> Option<&mut F>
[src]

pub fn dyn_material(&self, materialref: M) -> Option<&dyn Material>[src]

pub fn dyn_material_mut(&mut self, materialref: M) -> Option<&mut dyn Material>[src]

impl MaterialPool<MaterialRef>[src]

pub fn unused<'a, E: EntitiesExt<'a>>(&self, entities: &E) -> Vec<MaterialRef>[src]

pub fn remove_unused<'a, E: EntitiesExt<'a>>(&mut self, entities: &E)[src]

Trait Implementations

impl<M: Key> Index<M> for MaterialPool<M>[src]

type Output = Box<dyn FullMaterial>

The returned type after indexing.

impl<M: Key> IndexMut<M> for MaterialPool<M>[src]

Auto Trait Implementations

impl<M = MaterialRef> !RefUnwindSafe for MaterialPool<M>

impl<M = MaterialRef> !Send for MaterialPool<M>

impl<M = MaterialRef> !Sync for MaterialPool<M>

impl<M> Unpin for MaterialPool<M> where
    M: Unpin

impl<M = MaterialRef> !UnwindSafe for MaterialPool<M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]