summaryrefslogtreecommitdiff
path: root/test/raytracer/intersect.h
diff options
context:
space:
mode:
Diffstat (limited to 'test/raytracer/intersect.h')
-rw-r--r--test/raytracer/intersect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/raytracer/intersect.h b/test/raytracer/intersect.h
new file mode 100644
index 0000000..35241a6
--- /dev/null
+++ b/test/raytracer/intersect.h
@@ -0,0 +1,11 @@
+/* Return the closest base object intersecting the given ray, and
+ the curvilinear abscissa t of the intersection point.
+ Return NULL if no intersection.
+ Return t = 0.0 if the viewpoint (origin of the ray) is inside an
+ object. */
+
+struct object * intersect_ray(struct point * p,
+ struct vector * v,
+ struct object * obj,
+ int initial,
+ /*out*/ flt * t);