diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-03-09 23:31:27 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-03-09 23:31:27 +0800 |
| commit | 4014436905aace9acd47dde245b88bd5f69335ec (patch) | |
| tree | 412bb61300cdd225bf3f79f3927f6076f718f094 /src/ray.cc | |
| parent | 7aa2a67d8381c9a88d69a3f53d74a7f079214263 (diff) | |
| download | ray-tracing-4014436905aace9acd47dde245b88bd5f69335ec.tar.gz ray-tracing-4014436905aace9acd47dde245b88bd5f69335ec.tar.xz | |
Sending Rays Into the Scene
Diffstat (limited to 'src/ray.cc')
| -rw-r--r-- | src/ray.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ray.cc b/src/ray.cc new file mode 100644 index 0000000..718fee2 --- /dev/null +++ b/src/ray.cc @@ -0,0 +1,16 @@ +#include "ray.h" + +const point3& ray::origin() const +{ + return this->orig; +} + +const vec3& ray::direction() const +{ + return this->dir; +} + +point3 ray::at( double t ) const +{ + return this->orig + t * this->dir; +}
\ No newline at end of file |
