#include #include #include #include #include "defs.h" #include "functions.h" Ray::Ray (Point start, Point end) { this->direction = (end-start); this->origin = end; } Ray Ray::operator+(Ray &other) { Ray r; r.direction = direction + other.direction; r.origin = origin + other.origin; return r; } Ray Ray::operator-(Ray &other) { Ray r; r.direction = direction - other.direction; r.origin = origin - other.origin; return r; }