[][src]Struct rpt::Buffer

pub struct Buffer { /* fields omitted */ }

A buffer that stores sample results from path tracing

Implementations

impl Buffer[src]

pub fn new(width: u32, height: u32, filter: Filter) -> Self[src]

Construct a new buffer with a given width and height

pub fn add_sample(&mut self, x: u32, y: u32, sample: Color)[src]

Add a sample to the buffer, at a given pixel location

pub fn add_samples(&mut self, samples: &[Color])[src]

Add a uniform matrix of samples to the buffer

pub fn image(&self) -> RgbImage[src]

Converts the current buffer to an image

pub fn variance(&self) -> f64[src]

Return the average color variance of samples in each pixel

Auto Trait Implementations

impl RefUnwindSafe for Buffer

impl Send for Buffer

impl Sync for Buffer

impl Unpin for Buffer

impl UnwindSafe for Buffer

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>,