Struct three_d::renderer::light::Attenuation
source · pub struct Attenuation {
pub constant: f32,
pub linear: f32,
pub quadratic: f32,
}
Expand description
Specifies how the intensity of a light fades over distance.
The light intensity is scaled by 1 / max(1, constant + distance * linear + distance * distance * quadratic)
.
Fields§
§constant: f32
Constant attenuation factor.
linear: f32
Linear attenuation factor.
quadratic: f32
Quadratic attenuation factor.
Trait Implementations§
source§impl Clone for Attenuation
impl Clone for Attenuation
source§fn clone(&self) -> Attenuation
fn clone(&self) -> Attenuation
Returns a copy 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 Attenuation
impl Debug for Attenuation
source§impl Default for Attenuation
impl Default for Attenuation
source§impl PartialEq for Attenuation
impl PartialEq for Attenuation
source§fn eq(&self, other: &Attenuation) -> bool
fn eq(&self, other: &Attenuation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for Attenuation
impl PartialOrd for Attenuation
source§fn partial_cmp(&self, other: &Attenuation) -> Option<Ordering>
fn partial_cmp(&self, other: &Attenuation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for Attenuation
impl StructuralPartialEq for Attenuation
Auto Trait Implementations§
impl RefUnwindSafe for Attenuation
impl Send for Attenuation
impl Sync for Attenuation
impl Unpin for Attenuation
impl UnwindSafe for Attenuation
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