1 2 3 4 5 6 7 8 9 10 11 12 13
use crate::Vec3; #[derive(Copy, Clone)] pub struct Ray { pub origin: Vec3, pub direction: Vec3, } impl Ray { pub fn new(origin: Vec3, direction: Vec3) -> Ray { Ray { origin, direction } } }