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

Trait for abstracting cameras.

Required Methods§

source

fn new() -> Selfwhere Self: Sized,

source

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

Set the origin and center of the camera.

source

fn set_fov(&mut self, fov: PTF)

Set the fov of the camera.

source

fn gen_ray(&self, p: Vector2<PTF>, offset: PTF2, width: PTF, height: PTF) -> Ray

Generate a ray.

Implementors§