Skip to content

Commit f7ec58d

Browse files
committed
Added parameter back in to and removed erroneous time comment
1 parent 3d8d3eb commit f7ec58d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@
748748
struct hit_record {
749749
vec3 p;
750750
vec3 normal;
751+
double t;
752+
751753
};
752754

753755
class hittable {
@@ -878,8 +880,8 @@
878880
less work and put the determination at geometry time. This is simply a matter of preference and
879881
you'll see both implementations in the literature.
880882

881-
We add the `front_face` bool to the `hit_record` struct. I know that we’ll also want motion blur at
882-
some point, so I’ll also add a time input variable.
883+
We add the `front_face` bool to the `hit_record` struct. We'll also add a function to solve this
884+
calculation for us.
883885

884886
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
885887
#ifndef HITTABLE_H
@@ -891,7 +893,6 @@
891893
vec3 p;
892894
vec3 normal;
893895
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
894-
double t;
895896
bool front_face;
896897

897898
inline void set_face_normal(const ray& r, const vec3& outward_normal) {

0 commit comments

Comments
 (0)