]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/negation.h
Add an entry flag to SharedPoint
[libs/math.git] / source / geometry / negation.h
index ce2f7873d6aed3eeff7304e67abe7598b5c274c7..8e2b3f41a6d7c30681026176330d0ed1a04d965e 100644 (file)
@@ -79,7 +79,10 @@ inline unsigned Negation<T, D>::get_intersections(const Ray<T, D> &ray, SurfaceP
 {
        unsigned count = shape->get_intersections(ray, points, size);
        for(unsigned i=0; i<count; ++i)
+       {
                points[i].normal = -points[i].normal;
+               points[i].entry = !points[i].entry;
+       }
        return count;
 }