X-Git-Url: http://git.tdb.fi/?p=libs%2Fmath.git;a=blobdiff_plain;f=source%2Fgeometry%2Ftransformedshape.h;h=34fd2989f2cfeaadddcf40ef6822ae2fb37c62d0;hp=01253680f6340a9ed277f76664b906313f8314e2;hb=c135ff2480f4e2aaf05b0206631bb0e1b5d73fad;hpb=204db1dfb803a97481f2a8b3bbaf6e20be6e0980 diff --git a/source/geometry/transformedshape.h b/source/geometry/transformedshape.h index 0125368..34fd298 100644 --- a/source/geometry/transformedshape.h +++ b/source/geometry/transformedshape.h @@ -107,6 +107,7 @@ inline unsigned TransformedShape::get_intersections(const Ray &ray, /* XXX This is not correct for nonuniform scaling. Inverse of the transpose of the upper DxD part of the matrix should be used. */ points[i].normal = transformation.transform(points[i].normal); + points[i].distance = inner_product(points[i].position-ray.get_start(), ray.get_direction()); } } return count;