[][src]Enum rpt::Light

pub enum Light {
    Point(ColorDVec3),
    Ambient(Color),
    Directional(ColorDVec3),
    Object(Object),
}

Type representing various forms of lighting

Variants

Point(ColorDVec3)

Point light represented as (color, location)

Ambient(Color)

Ambient light represented as (color)

Directional(ColorDVec3)

Directional light represented as (color, direction)

Object(Object)

Light from an invisible, emissive object

Implementations

impl Light[src]

pub fn illuminate(
    &self,
    world_pos: &DVec3,
    rng: &mut StdRng
) -> (Color, DVec3, f64)
[src]

Illuminates a point, returning (intensity, dir_to_light, dist_to_light)

Trait Implementations

impl SceneAdd<Light> for Scene[src]

Auto Trait Implementations

impl !RefUnwindSafe for Light

impl Send for Light

impl Sync for Light

impl Unpin for Light

impl !UnwindSafe for Light

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,