Add renderstat to get some info about rendering.

This commit is contained in:
Godzil
2020-02-27 17:20:55 +00:00
parent a4ddfddbf3
commit a6f0422bd1
19 changed files with 194 additions and 12 deletions

View File

@@ -10,6 +10,7 @@
#define DORAYME_RAY_H
#include <tuple.h>
#include <renderstat.h>
class Ray
{
@@ -17,7 +18,7 @@ public:
Tuple direction;
Tuple origin;
Ray(Tuple origin, Tuple direction) : origin(origin), direction(direction) { };
Ray(Tuple origin, Tuple direction) : origin(origin), direction(direction) { stats.addRay(); };
Tuple position(double t) { return this->origin + this->direction * t; };
};