From 4014436905aace9acd47dde245b88bd5f69335ec Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Mon, 9 Mar 2026 23:31:27 +0800 Subject: Sending Rays Into the Scene --- src/ray.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/ray.cc (limited to 'src/ray.cc') 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 -- cgit v1.2.3