aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
blob: 22998ddc0c8aadfefe94b94cf5a4316bfccacccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use pathtrace::camera::Camera;
use pathtrace::core::{Vector3f, Vector2f};


fn main() {

    let cam = Camera::new(
        Vector3f::new(10.0), 
        Vector3f::new(0.0), 
        Vector3f::new_xyz(0.0, 1.0, 0.0), 
        90.0, Vector2f::new(10.0),
        );

    let (r, _) = cam.generate_ray(Vector2f::new(5.0));

    println!("r: {}, norm: {}", r.direction, r.direction.norm());
}