aboutsummaryrefslogtreecommitdiff
path: root/src/ray.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ray.cc')
-rw-r--r--src/ray.cc16
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