pub trait Camera3D: Sync + Send {
    // Required methods
    fn new() -> Self
       where Self: Sized;
    fn set(&mut self, origin: F3, center: F3);
    fn set_fov(&mut self, fov: F);
    fn gen_ray(&self, p: F2, offset: F2, width: F, height: F) -> Ray;
}
Expand description

Trait for abstracting cameras.

Required Methods§

source

fn new() -> Selfwhere Self: Sized,

source

fn set(&mut self, origin: F3, center: F3)

Set the origin and center of the camera.

source

fn set_fov(&mut self, fov: F)

Set the fov of the camera.

source

fn gen_ray(&self, p: F2, offset: F2, width: F, height: F) -> Ray

Generate a ray.

Implementors§