pub struct Trace {
pub color: OffscreenTarget,
pub albedo: OffscreenTarget,
pub normal: OffscreenTarget,
/* private fields */
}Fields§
§color: OffscreenTarget§albedo: OffscreenTarget§normal: OffscreenTargetImplementations§
Source§impl Trace
impl Trace
pub fn sample_adaptive<T: Turned>( &mut self, gpu: &Gpu, adaptive: Adaptive, seed: u32, pacer: &mut Pacer, between: impl FnMut(f64) -> T, ) -> Result<Converged, String>
pub fn sample_adaptive_with<T: Turned>( &mut self, gpu: &Gpu, adaptive: Adaptive, seed: u32, pacer: &mut Pacer, between: impl FnMut(f64) -> T, reached: impl FnMut(Round), ) -> Result<Converged, String>
Source§impl Trace
impl Trace
pub fn new<E: Clone + Into<Environment>>( gpu: &Gpu, scene: &Scene<E>, width: u32, height: u32, ) -> Result<Self, TraceError>
pub fn new_detailed<E: Clone + Into<Environment>>( gpu: &Gpu, scene: &Scene<E>, detail: &Detail, width: u32, height: u32, ) -> Result<Self, TraceError>
pub fn hardware_rays(&self) -> bool
pub fn set_environment( &mut self, gpu: &Gpu, environment: &Environment, ) -> Result<(), String>
pub fn set_camera(&mut self, camera: Camera) -> Result<(), String>
pub fn set_window( &mut self, full: [u32; 2], origin: [u32; 2], ) -> Result<(), String>
pub fn window(&self) -> ([u32; 2], [u32; 2])
pub fn set_lens(&mut self, lens: Lens) -> Result<(), String>
pub fn set_projection(&mut self, projection: Projection) -> Result<(), String>
pub fn set_sun_radius(&mut self, radius_deg: f32) -> Result<(), String>
pub fn set_daylight( &mut self, gpu: &Gpu, daylight: Daylight, turbidity: f32, ground_albedo: [f32; 3], ) -> Result<(), String>
pub fn sample(&mut self, gpu: &Gpu, count: u32, seed: u32) -> Result<(), String>
pub fn sample_paced<T: Turned>( &mut self, gpu: &Gpu, count: u32, seed: u32, pacer: &mut Pacer, between: impl FnMut(f64) -> T, ) -> Result<Stats, String>
pub fn lanes(&self) -> u32
pub fn samples(&self) -> u32
pub fn readback_color(&self, gpu: &Gpu) -> Result<Vec<u8>, String>
pub fn readback(&self, gpu: &Gpu) -> Result<Output, String>
Auto Trait Implementations§
impl Freeze for Trace
impl !RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnsafeUnpin for Trace
impl !UnwindSafe for Trace
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.