diff --git a/src/camera.rs b/src/camera.rs index 757f4f5..c654d66 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -27,7 +27,7 @@ pub struct Camera { defocus_disk_v: Vec3, } -// FIXME: kinda out of place in this file. +// FIXME (low priority): kinda out of place in this file. fn deg_to_rad(deg: f32) -> f32 { deg * PI / 180. } diff --git a/src/main.rs b/src/main.rs index 698be0c..ae1b3b7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,12 +15,12 @@ use crate::scenes::scene::Scene; use crate::vec3::Vec3; use dotenv::dotenv; -// TODO: implement scene serialization +// TODO (low priority): implement scene serialization fn main() { dotenv().ok(); pretty_env_logger::init(); - // TODO: better cli parsing || add random flag to generate random scene + // TODO (medium priority): better cli parsing || add random flag to generate random scene let mut json_file = "./scenes/scene.json"; let args: Vec = env::args().collect(); if args.len() > 1 { diff --git a/src/objects/circle.rs b/src/objects/circle.rs index f2f35bd..9d55455 100644 --- a/src/objects/circle.rs +++ b/src/objects/circle.rs @@ -61,7 +61,7 @@ impl Hittable for Circle { fn to_uv(&self, point: &Vec3) -> Vec3 { let p = *point - self.center; - // TODO: add rotated texture support + // TODO (low priority): add rotated texture support Vec3::new( 0.5 + p.y().atan2(*p.x()) / (2. * PI), 1. - (p.z() / self.radius).acos() / PI, diff --git a/src/objects/cube.rs b/src/objects/cube.rs index 297b361..1c5129d 100644 --- a/src/objects/cube.rs +++ b/src/objects/cube.rs @@ -43,7 +43,7 @@ impl Hittable for Cube { } fn to_uv(&self, _point: &Vec3) -> Vec3 { - // TODO: map to [0.1] relative to specific face + // TODO (low priority): map to [0.1] relative to specific face todo!() } } diff --git a/src/objects/hit.rs b/src/objects/hit.rs index b2540a4..57e630e 100644 --- a/src/objects/hit.rs +++ b/src/objects/hit.rs @@ -80,7 +80,7 @@ impl Hit { (self.u, self.v) } - // TODO: use front_face to discard back-hits for culling + // TODO (low priority): use front_face to discard back-hits for culling pub fn hit_list(hittables: &Vec>, r: &Ray) -> Option { let mut closest: Option = None; for hittable in hittables { diff --git a/src/objects/sphere.rs b/src/objects/sphere.rs index ebf3282..83a9f88 100644 --- a/src/objects/sphere.rs +++ b/src/objects/sphere.rs @@ -74,7 +74,7 @@ impl Hittable for Sphere { fn to_uv(&self, point: &Vec3) -> Vec3 { let p = *point - self.center; - // TODO: add rotated texture support + // TODO (medium priority): add rotated texture support Vec3::new( 0.5 + p.y().atan2(*p.x()) / (2. * PI), 1. - (p.z() / self.radius).acos() / PI, diff --git a/src/raytracer.rs b/src/raytracer.rs index 821c49a..9d32b1c 100644 --- a/src/raytracer.rs +++ b/src/raytracer.rs @@ -26,7 +26,7 @@ pub fn write_image(filename: &str, pixels: &[u8], width: u32, height: u32) { pub fn render(scene: &mut Scene) { scene.init(); - // TODO: currently splits per vertical line, but could be more granular (per chunk) + // TODO (low priority): currently splits per vertical line, but could be more granular (per chunk) let mut pixels = vec![0_u8; (scene.get_image_width() * scene.get_image_height() * 3) as usize]; let scanlines: Vec<(usize, &mut [u8])> = pixels .chunks_mut(scene.get_image_width() as usize * 3) diff --git a/src/scenes/scene.rs b/src/scenes/scene.rs index ecf48d2..5303e31 100644 --- a/src/scenes/scene.rs +++ b/src/scenes/scene.rs @@ -28,7 +28,7 @@ pub struct Scene { image_width: u32, image_height: u32, - // raytracing // TODO: think about organisation of these vars, also in Camera + // raytracing max_depth: u32, }