diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-20 14:49:20 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-20 14:49:20 +0100 |
| commit | 3935a609141623e7cfb3fa339da1a166e3917018 (patch) | |
| tree | ba8d6275b1f9947af92f9c887608f71f73e6609d /src/ray.cpp | |
| parent | 2d8e108dd6811bcf55bed28f1855a36077f8c674 (diff) | |
Ray tracer renderer
Use ray for rendering
Setup basic rendering stuff camera / viewport
Diffstat (limited to 'src/ray.cpp')
| -rw-r--r-- | src/ray.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ray.cpp b/src/ray.cpp new file mode 100644 index 0000000..2d479b7 --- /dev/null +++ b/src/ray.cpp @@ -0,0 +1,8 @@ +#include "ray.hpp" + +ray::ray(const point3& origin, const vec3& direction): origin(origin), direction(direction) +{} + +point3 ray::at(double t) { + return origin + direction * t; +} |
