[][src]Struct tray_rust::film::render_target::RenderTarget

pub struct RenderTarget { /* fields omitted */ }

RenderTarget is a RGBF render target to write our image too while rendering

Methods

impl RenderTarget[src]

pub fn new(
    image_dim: (usize, usize),
    lock_size: (usize, usize),
    filter: Box<dyn Filter + Send + Sync>
) -> RenderTarget
[src]

Create a render target with width * height pixels

pub fn write(&self, samples: &[ImageSample], region: &Region)[src]

Write all the image samples to the render target

pub fn clear(&mut self)[src]

Clear the render target to black

pub fn dimensions(&self) -> (usize, usize)[src]

Get the dimensions of the render target

pub fn get_render(&self) -> Vec<u8>[src]

Convert the floating point color buffer to 24bpp sRGB for output to an image

pub fn get_rendered_blocks(
    &self
) -> ((usize, usize), Vec<(usize, usize)>, Vec<f32>)
[src]

Get the blocks that have had pixels written too them. Returns the size of each block, a list of block positions in pixels and then pixels for the blocks (in a single f32 vec). The block's pixels are stored in the same order their position appears in the block positions vec and contain dim.0 * dim.1 * 4 f32's per block.

pub fn get_renderf32(&self) -> Vec<f32>[src]

Get the raw floating point framebuffer

Auto Trait Implementations

impl Send for RenderTarget

impl Sync for RenderTarget

impl Unpin for RenderTarget

impl !UnwindSafe for RenderTarget

impl !RefUnwindSafe for RenderTarget

Blanket Implementations

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

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

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> SetParameter for T[src]