pub struct AnimatedLight {
pub base_color: Color,
pub base_intensity: f32,
pub position: Vec3,
pub radius: f32,
pub pattern: AnimationPattern,
pub enabled: bool,
pub time_offset: f32,
pub elapsed: f32,
pub speed: f32,
pub looping: bool,
}Expand description
A wrapper around any light type that applies an animation pattern.
Fields§
§base_color: Color§base_intensity: f32§position: Vec3§radius: f32§pattern: AnimationPattern§enabled: bool§time_offset: f32§elapsed: f32§speed: f32The speed multiplier for animation playback.
looping: boolWhether to loop or stop at end.
Implementations§
Source§impl AnimatedLight
impl AnimatedLight
pub fn new(position: Vec3, color: Color, pattern: AnimationPattern) -> Self
Sourcepub fn current_intensity(&self) -> f32
pub fn current_intensity(&self) -> f32
Get the current effective intensity.
Sourcepub fn current_color(&self) -> Color
pub fn current_color(&self) -> Color
Get the current effective color.
Sourcepub fn irradiance_at(&self, point: Vec3) -> Color
pub fn irradiance_at(&self, point: Vec3) -> Color
Compute irradiance at a point.
Trait Implementations§
Source§impl Clone for AnimatedLight
impl Clone for AnimatedLight
Source§fn clone(&self) -> AnimatedLight
fn clone(&self) -> AnimatedLight
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 AnimatedLight
impl Debug for AnimatedLight
Auto Trait Implementations§
impl Freeze for AnimatedLight
impl RefUnwindSafe for AnimatedLight
impl Send for AnimatedLight
impl Sync for AnimatedLight
impl Unpin for AnimatedLight
impl UnsafeUnpin for AnimatedLight
impl UnwindSafe for AnimatedLight
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.