Prepare code to be able to get material from some form of a "group leader".

This commit is contained in:
Godzil
2020-02-26 00:32:14 +00:00
parent 5e4cfb84e6
commit 1c00077949
3 changed files with 18 additions and 10 deletions

View File

@@ -68,6 +68,10 @@ Computation Intersection::prepareComputation(Ray r, Intersect *xs)
}
}
Shape *s = this->object;
/* For now don't get root group material */
//while(s->parent != nullptr) { s = s->parent; }
return Computation(this->object,
this->t,
hitP,
@@ -78,5 +82,6 @@ Computation Intersection::prepareComputation(Ray r, Intersect *xs)
reflectV,
n1,
n2,
underHitP);
underHitP,
&s->material);
}