[][src]Struct rpt::Renderer

pub struct Renderer<'a> {
    pub scene: &'a Scene,
    pub camera: Camera,
    pub width: u32,
    pub height: u32,
    pub exposure_value: f64,
    pub filter: Filter,
    pub max_bounces: u32,
    pub num_samples: u32,
}

Builder object for rendering a scene

Fields

scene: &'a Scene

The scene to be rendered

camera: Camera

The camera to use

width: u32

The width of the output image

height: u32

The height of the output image

exposure_value: f64

Exposure value (EV)

filter: Filter

Optional noise-reduction filter

max_bounces: u32

The maximum number of ray bounces

num_samples: u32

Number of random paths traced per pixel

Implementations

impl<'a> Renderer<'a>[src]

pub fn new(scene: &'a Scene, camera: Camera) -> Self[src]

Construct a new renderer for a scene

pub fn width(self, width: u32) -> Self[src]

Set the width of the rendered scene

pub fn height(self, height: u32) -> Self[src]

Set the height of the rendered scene

pub fn exposure_value(self, exposure_value: f64) -> Self[src]

Set the exposure value of the rendered scene

pub fn filter(self, filter: Filter) -> Self[src]

Set the noise reduction filter

pub fn max_bounces(self, max_bounces: u32) -> Self[src]

Set the maximum number of ray bounces when ray is traced

pub fn num_samples(self, num_samples: u32) -> Self[src]

Set the number of random paths traced per pixel

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

Render the scene by path tracing

pub fn iterative_render<F>(&self, callback_interval: u32, callback: F) where
    F: FnMut(u32, &Buffer), 
[src]

Render the scene iteratively, calling a callback after every k samples

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Renderer<'a>

impl<'a> Send for Renderer<'a>

impl<'a> Sync for Renderer<'a>

impl<'a> Unpin for Renderer<'a>

impl<'a> !UnwindSafe for Renderer<'a>

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