aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-02-08 14:32:11 +0100
committerJulian T <julian@jtle.dk>2021-02-08 14:32:11 +0100
commitdbe5f54957ddc13549a6ce822da95170aa09a0c6 (patch)
tree7cc45f25dd75cb7893fd0af49ae5353e38c5e392 /src/core
parent6df0417568ef6f315138d9c3fd707ac3241a6a30 (diff)
Rename to pathtrace, started for of depth of field, choose closest intersect
Diffstat (limited to 'src/core')
-rw-r--r--src/core/bound.rs4
-rw-r--r--src/core/hittable.rs2
-rw-r--r--src/core/vector3.rs2
3 files changed, 5 insertions, 3 deletions
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<T: Number> Bound2<T> {
/// # 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<T: Number> Bound2<T> {
/// # 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);