Start working on dumping the world (to a JSON file) for debug purposes.

This commit is contained in:
Godzil
2020-02-27 18:03:08 +00:00
parent 2926166ce6
commit c369d2fe2d
15 changed files with 116 additions and 0 deletions

View File

@@ -11,6 +11,7 @@
class Shape;
#include <stdio.h>
#include <ray.h>
#include <tuple.h>
#include <matrix.h>
@@ -63,6 +64,8 @@ public:
virtual void updateTransform();
virtual void dumpMe(FILE *fp);
Tuple worldToObject(Tuple point) { return this->inverseTransform * point; };
Tuple objectToWorld(Tuple point) { return this->transformMatrix * point; };
Tuple normalToWorld(Tuple normalVector);