[][src]Struct tray_rust::scene::Scene

pub struct Scene {
    pub cameras: Vec<Camera>,
    pub bvh: BVH<Instance>,
    pub integrator: Box<dyn Integrator + Send + Sync>,
    // some fields omitted

The scene containing the objects and camera configuration we'd like to render, shared immutably among the ray tracing threads


cameras: Vec<Camera>bvh: BVH<Instance>integrator: Box<dyn Integrator + Send + Sync>


impl Scene[src]

pub fn load_file(file: &str) -> (Scene, RenderTarget, usize, FrameInfo)[src]

pub fn intersect(&self, ray: &mut Ray) -> Option<Intersection>[src]

Test the ray for intersections against the objects in the scene. Returns Some(Intersection) if an intersection was found and None if not.

pub fn update_frame(&mut self, frame: usize, start: f32, end: f32)[src]

Advance the time the scene is currently displaying to the time range passed

pub fn active_camera(&self) -> &Camera[src]

Get the active camera for the current frame

Auto Trait Implementations

impl Send for Scene

impl Sync for Scene

impl Unpin for Scene

impl !UnwindSafe for Scene

impl !RefUnwindSafe for Scene

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 

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

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T> SetParameter for T[src]