pub struct LightProbe {
pub position: Vec3,
pub sh: SphericalHarmonics9,
pub valid: bool,
pub radius: f32,
}Expand description
A single light probe storing SH coefficients at a world position.
Fields§
§position: Vec3§sh: SphericalHarmonics9§valid: bool§radius: f32Influence radius.
Implementations§
Source§impl LightProbe
impl LightProbe
pub fn new(position: Vec3) -> Self
pub fn with_sh(self, sh: SphericalHarmonics9) -> Self
pub fn with_radius(self, radius: f32) -> Self
Sourcepub fn irradiance(&self, normal: Vec3) -> Color
pub fn irradiance(&self, normal: Vec3) -> Color
Evaluate irradiance at this probe for the given normal.
Trait Implementations§
Source§impl Clone for LightProbe
impl Clone for LightProbe
Source§fn clone(&self) -> LightProbe
fn clone(&self) -> LightProbe
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 moreAuto Trait Implementations§
impl Freeze for LightProbe
impl RefUnwindSafe for LightProbe
impl Send for LightProbe
impl Sync for LightProbe
impl Unpin for LightProbe
impl UnsafeUnpin for LightProbe
impl UnwindSafe for LightProbe
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.