File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 3159
3159
The pseudocode for the `translate::hit` function above describes the function in terms of _moving_:
3160
3160
3161
3161
1. Move the ray backwards by the offset
3162
- 2. Determine where (if any) an intersection occurs along the offset ray
3163
- 3. Move the intersection point forwards by
3162
+ 2. Determine whether an intersection exists along the offset ray (and if so, where)
3163
+ 3. Move the intersection point forwards by the offset
3164
3164
3165
3165
But this can also be thought of in terms of a _changing of coordinates_:
3166
3166
3167
3167
1. Change the ray from world space to object space
3168
- 2. Determine where (if any) an intersection occurs in object space
3168
+ 2. Determine whether an intersection exists in object space (and if so, where)
3169
3169
3. Change the intersection point from object space to world space
3170
3170
3171
3171
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class translate : public hittable {
58
58
// Move the ray backwards by the offset
59
59
ray offset_r (r.origin () - offset, r.direction (), r.time ());
60
60
61
- // Determine where (if any) an intersection occurs along the offset ray
61
+ // Determine whether an intersection exists along the offset ray (and if so, where)
62
62
if (!object->hit (offset_r, ray_t , rec))
63
63
return false ;
64
64
@@ -124,7 +124,7 @@ class rotate_y : public hittable {
124
124
125
125
ray rotated_r (origin, direction, r.time ());
126
126
127
- // Determine where (if any) an intersection occurs in object space
127
+ // Determine whether an intersection exists in object space (and if so, where)
128
128
if (!object->hit (rotated_r, ray_t , rec))
129
129
return false ;
130
130
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ class translate : public hittable {
66
66
// Move the ray backwards by the offset
67
67
ray offset_r (r.origin () - offset, r.direction (), r.time ());
68
68
69
- // Determine where (if any) an intersection occurs along the offset ray
69
+ // Determine whether an intersection exists along the offset ray (and if so, where)
70
70
if (!object->hit (offset_r, ray_t , rec))
71
71
return false ;
72
72
@@ -132,7 +132,7 @@ class rotate_y : public hittable {
132
132
133
133
ray rotated_r (origin, direction, r.time ());
134
134
135
- // Determine where (if any) an intersection occurs in object space
135
+ // Determine whether an intersection exists in object space (and if so, where)
136
136
if (!object->hit (rotated_r, ray_t , rec))
137
137
return false ;
138
138
You can’t perform that action at this time.
0 commit comments