X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fgeometry%2Ftransformedshape.h;h=bf508f9b1da31be6145fd972e350481b9502d74b;hb=fe9d42c7cb18bc1db6d278bdc2f8372822d025bf;hp=90c37b0bb0a2b234c0e7929796846c25cc7e4648;hpb=aee0d4c9f7d4dc6ac77b6ff3429973f16d86144b;p=libs%2Fmath.git diff --git a/source/geometry/transformedshape.h b/source/geometry/transformedshape.h index 90c37b0..bf508f9 100644 --- a/source/geometry/transformedshape.h +++ b/source/geometry/transformedshape.h @@ -115,7 +115,7 @@ inline unsigned TransformedShape::get_intersections(const Ray &ray, points[i].position = transformation.transform(points[i].position); /* 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].normal = transformation.transform_linear(points[i].normal); points[i].distance = inner_product(points[i].position-ray.get_start(), ray.get_direction()); } }