More Ray work.

This commit is contained in:
Godzil
2020-02-15 23:45:19 +00:00
parent 79af9fbc97
commit 8faf1db3be
3 changed files with 46 additions and 1 deletions

View File

@@ -9,4 +9,17 @@
#ifndef DORAYME_RAY_H
#define DORAYME_RAY_H
#include <tuple.h>
class Ray
{
public:
Vector direction;
Point origin;
Ray(Point origin, Vector direction) : origin(origin), direction(direction) { };
Tuple position(double t) { return this->origin + this->direction * t; };
};
#endif //DORAYME_RAY_H