[−][src]Struct tray_rust::film::render_target::RenderTarget
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]
image_dim: (usize, usize),
lock_size: (usize, usize),
filter: Box<dyn Filter + Send + Sync>
) -> RenderTarget
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]
&self
) -> ((usize, usize), Vec<(usize, usize)>, Vec<f32>)
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]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,