This repository has been archived on 2023-01-29. You can view files and clone it, but cannot push or open issues or pull requests.
2019-01-14 09:46:47 +01:00

20 lines
315 B
C++

#ifndef RAYH
#define RAYH
#include "vec3.h"
class ray
{
public:
ray() {}
ray(const vec3& a, const vec3& b) { A = a; B = b; }
vec3 origin() const { return A; }
vec3 direction() const { return B; }
vec3 point_at_parameter(float t) const { return A + t * B; }
vec3 A;
vec3 B;
};
#endif