Camera3D

Trait Camera3D 

Source
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() -> Self
where 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§