pub struct EmissiveGlyph {
pub position: Vec3,
pub color: Color,
pub emission_strength: f32,
pub radius: f32,
pub glyph_character: char,
pub enabled: bool,
pub emission_threshold: f32,
}Expand description
Auto light source generated from a bright glyph that exceeds the emission threshold.
Fields§
§position: Vec3§color: Color§emission_strength: f32§radius: f32§glyph_character: char§enabled: bool§emission_threshold: f32The threshold above which a glyph emission value becomes a light source.
Implementations§
Source§impl EmissiveGlyph
impl EmissiveGlyph
pub fn new(position: Vec3, character: char, color: Color, emission: f32) -> Self
Sourcepub fn effective_intensity(&self) -> f32
pub fn effective_intensity(&self) -> f32
The effective intensity above the threshold.
Sourcepub fn irradiance_at(&self, point: Vec3) -> Color
pub fn irradiance_at(&self, point: Vec3) -> Color
Compute irradiance at a world point (treated as a small point light).
Sourcepub fn auto_radius(emission_strength: f32) -> f32
pub fn auto_radius(emission_strength: f32) -> f32
Estimate emissive glyph radius based on emission strength.
Trait Implementations§
Source§impl Clone for EmissiveGlyph
impl Clone for EmissiveGlyph
Source§fn clone(&self) -> EmissiveGlyph
fn clone(&self) -> EmissiveGlyph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EmissiveGlyph
impl Debug for EmissiveGlyph
Auto Trait Implementations§
impl Freeze for EmissiveGlyph
impl RefUnwindSafe for EmissiveGlyph
impl Send for EmissiveGlyph
impl Sync for EmissiveGlyph
impl Unpin for EmissiveGlyph
impl UnsafeUnpin for EmissiveGlyph
impl UnwindSafe for EmissiveGlyph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.