pub struct RayTraceFrame<'a> {
pub camera: &'a Camera3D,
pub lights: &'a LightingUniforms,
pub settings: &'a RayTraceSettings,
pub width: u32,
pub height: u32,
}Expand description
Read-only frame inputs shared by the CPU renderer and GPU header packer.
Named width and height fields make their roles explicit at call sites. The camera, lighting, and settings are borrowed; dimensions are copied. Constructing a frame neither clones those resources nor allocates memory.
Fields§
§camera: &'a Camera3DThe camera supplying the eye, target, up, fov, and depth range.
lights: &'a LightingUniformsThe lights, ambient, and shading eye.
settings: &'a RayTraceSettingsThe sampling grid and bounce limit.
width: u32The frame width in pixels.
height: u32The frame height in pixels.
Implementations§
Source§impl<'a> RayTraceFrame<'a>
impl<'a> RayTraceFrame<'a>
pub fn get_camera(&self) -> &'a Camera3D
pub fn get_lights(&self) -> &'a LightingUniforms
pub fn get_settings(&self) -> &'a RayTraceSettings
pub fn get_width(&self) -> u32
pub fn get_height(&self) -> u32
Trait Implementations§
Source§impl<'a> Clone for RayTraceFrame<'a>
impl<'a> Clone for RayTraceFrame<'a>
impl<'a> Copy for RayTraceFrame<'a>
Auto Trait Implementations§
impl<'a> Freeze for RayTraceFrame<'a>
impl<'a> RefUnwindSafe for RayTraceFrame<'a>
impl<'a> Send for RayTraceFrame<'a>
impl<'a> Sync for RayTraceFrame<'a>
impl<'a> Unpin for RayTraceFrame<'a>
impl<'a> UnsafeUnpin for RayTraceFrame<'a>
impl<'a> UnwindSafe for RayTraceFrame<'a>
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