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