Group should work now.

This commit is contained in:
Godzil
2020-02-24 17:25:54 +00:00
parent 7c794f0496
commit 7bbe5e843b
5 changed files with 40 additions and 10 deletions

View File

@@ -18,7 +18,7 @@ Pattern::Pattern(Colour a, Colour b): a(a), b(b)
Colour Pattern::patternAtObject(Shape *object, Tuple worldPoint)
{
Tuple objectPoint = object->inverseTransform * worldPoint;
Tuple objectPoint = object->worldToObject(worldPoint);
Tuple patternPoint = this->inverseTransform * objectPoint;
return this->patternAt(patternPoint);