Triangle normal calculated.
This commit is contained in:
parent
e168bb7b77
commit
3d1ef91931
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ bool Triangle::intersect(Ray &ray) const {
|
|||
return false;
|
||||
|
||||
// Calculate the normal
|
||||
// IMPLEMENT ME
|
||||
ray.normal = crossProduct(edge1, edge1);
|
||||
|
||||
// Calculate the surface position
|
||||
ray.surface = u * this->surface[1] + v * this->surface[2] + (1 - u - v) * this->surface[0];
|
||||
|
|
Loading…
Reference in a new issue