Add test for intersection and fix data in raytracer test.

This commit is contained in:
King_DuckZ 2017-02-10 15:40:26 +00:00
parent 413ff4e558
commit 80d0e1c336
2 changed files with 44 additions and 12 deletions

View file

@ -71,7 +71,7 @@ namespace curry {
assert(not (std::abs(r_cross_s) <= FLT_EPSILON));
const auto inv_r_cross_s = 1.0f / r_cross_s;
const auto t = cross(q - p, s) * inv_r_cross_s;
const auto u = cross(q - p, r) * inv_r_cross_s;
//const auto u = cross(q - p, r) * inv_r_cross_s;
return t;
//if (0.0f <= t and t <= 1.0f and 0.0f <= u and u <= 1.0f)