X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=antikythera;a=blobdiff_plain;f=src%2Fgeom.cc;fp=src%2Fgeom.cc;h=a6b26e88d53eae7d96b18a9a6c90dbf1d3638f87;hp=23391a73444f094dbf0c639216e19180c34ff6fd;hb=080d7a779d43f549fc16c44e709cbf5989180fdf;hpb=b29d7193d03833109cfdda3ab576fe183efd8acf diff --git a/src/geom.cc b/src/geom.cc index 23391a7..a6b26e8 100644 --- a/src/geom.cc +++ b/src/geom.cc @@ -244,6 +244,7 @@ bool Plane::intersect(const Ray &ray, HitPoint *hit) const Vec3 ptdir = pt - ray.origin; float t = dot(normal, ptdir) / ndotdir; + hit->dist = t; hit->pos = ray.origin + ray.dir * t; hit->normal = normal; hit->obj = this;