diff options
Diffstat (limited to 'src/ray.h')
| -rw-r--r-- | src/ray.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/ray.h b/src/ray.h new file mode 100644 index 0000000..d9c42dc --- /dev/null +++ b/src/ray.h @@ -0,0 +1,22 @@ +#ifndef RAY_H +#define RAY_H + +#include "vec3.h" + +class ray +{ +public: + ray() {} + ray( const point3& origin, const vec3& direction ) : orig( origin ), dir( direction ) {} + + const point3& origin() const; + const vec3& direction() const; + + point3 at( double t ) const; + +private: + point3 orig; + vec3 dir; +}; + +#endif
\ No newline at end of file |
