Struct rustic_zen::image::Image
source · pub struct Image { /* private fields */ }
Expand description
Represents an image while ray rendering is happening
This struct uses floats to represent each pixel of the image so normalisation can happen after rendering finishes.
Image is created and populated by the renderer. Only export functions are exposed.
Implementations§
Trait Implementations§
source§impl ExportImage for Image
impl ExportImage for Image
source§fn get_lightpower(&self) -> f32
fn get_lightpower(&self) -> f32
Returns the lightpower of the scene most recently rendered to this image.
source§fn get_size(&self) -> (usize, usize)
fn get_size(&self) -> (usize, usize)
Returns the image size in pixels in the format
(width, height)
source§fn to_rgbaf32(&self) -> Vec<f32>
fn to_rgbaf32(&self) -> Vec<f32>
Outputs the image.
Serialsiing the image to a sequence of 32 bit floating point RGBA samples stored in a
Vec<f32>
,
suitible for use in high bit depth images such as used by blender.source§impl RenderImage for Image
impl RenderImage for Image
source§fn draw_line(&self, ray: RayResult)
fn draw_line(&self, ray: RayResult)
Called in every rendering thread to add a Ray to the render target
source§fn prepare_render(&mut self, lightpower: f32)
fn prepare_render(&mut self, lightpower: f32)
called momentarilly before the render begins to allow the render target to set it’s self up to receive calls to
draw_line
source§fn finish_render(&mut self)
fn finish_render(&mut self)
called immediately after a render ends to allow the render target to clean up or finalize results
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more