More Ray work.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user