about summary refs log tree commit diff stats
path: root/apps/raytracing/ray.mu
diff options
context:
space:
mode:
Diffstat (limited to 'apps/raytracing/ray.mu')
-rw-r--r--apps/raytracing/ray.mu24
1 files changed, 0 insertions, 24 deletions
diff --git a/apps/raytracing/ray.mu b/apps/raytracing/ray.mu
deleted file mode 100644
index 20cc42e9..00000000
--- a/apps/raytracing/ray.mu
+++ /dev/null
@@ -1,24 +0,0 @@
-type ray {
-  orig: vec3  # point
-  dir: vec3
-}
-
-# A little different from the constructor at https://raytracing.github.io/books/RayTracingInOneWeekend.html
-# We immediately normalize the direction vector so we don't have to keep doing
-# so.
-fn initialize-ray _self: (addr ray), o: (addr vec3), d: (addr vec3) {
-  var self/esi: (addr ray) <- copy _self
-  var dest/eax: (addr vec3) <- get self, orig
-  copy-object o, dest
-  dest <- get self, dir
-  vec3-unit d, dest
-}
-
-fn ray-at _self: (addr ray), t: float, out: (addr vec3) {
-  var self/esi: (addr ray) <- copy _self
-  var src/eax: (addr vec3) <- get self, dir
-  copy-object src, out
-  vec3-scale-up out, t
-  src <- get self, orig
-  vec3-add-to out, src
-}