From dbe5f54957ddc13549a6ce822da95170aa09a0c6 Mon Sep 17 00:00:00 2001 From: Julian T Date: Mon, 8 Feb 2021 14:32:11 +0100 Subject: Rename to pathtrace, started for of depth of field, choose closest intersect --- src/core/bound.rs | 4 ++-- src/core/hittable.rs | 2 ++ src/core/vector3.rs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/core') diff --git a/src/core/bound.rs b/src/core/bound.rs index 635218a..a1c1070 100644 --- a/src/core/bound.rs +++ b/src/core/bound.rs @@ -52,7 +52,7 @@ impl Bound2 { /// # Examples /// /// ``` - /// use pathtrace::core::Bound2i; + /// use rendering::core::Bound2i; /// let b = Bound2i::new_xyxy(2, 2, 6, 7); /// let diag = b.diagonal(); /// @@ -67,7 +67,7 @@ impl Bound2 { /// # Examples /// /// ``` - /// use pathtrace::core::Bound2i; + /// use rendering::core::Bound2i; /// let b = Bound2i::new_xyxy(10, 10, 20, 20); /// /// assert!(b.area() == 100); diff --git a/src/core/hittable.rs b/src/core/hittable.rs index 20c82f7..e495d5b 100644 --- a/src/core/hittable.rs +++ b/src/core/hittable.rs @@ -1,10 +1,12 @@ use crate::core::{Vector3f, Ray}; +use crate::Float; /// Returns the context of a intersection pub struct Intersection { /// Normal vector at intersection pub n: Vector3f, pub p: Vector3f, + pub t: Float, } impl Intersection { diff --git a/src/core/vector3.rs b/src/core/vector3.rs index 9d6c1cf..1ae4db2 100644 --- a/src/core/vector3.rs +++ b/src/core/vector3.rs @@ -128,7 +128,7 @@ impl Vector3f { /// # Example /// /// ``` - /// use pathtrace::core::Vector3f; + /// use rendering::core::Vector3f; /// let mut v = Vector3f::new_xyz(10.0, 0.0, 0.0); /// v.norm_in(); /// assert!(v.x == 1.0); -- cgit v1.2.3