]> git.tdb.fi Git - libs/math.git/blobdiff - source/geometry/transformedshape.h
Miscellaneous fixes, mostly stylistic
[libs/math.git] / source / geometry / transformedshape.h
index 90c37b0bb0a2b234c0e7929796846c25cc7e4648..5a5cf11e8dab05ded01006b2d21189b7b97dc5c9 100644 (file)
@@ -48,7 +48,7 @@ inline TransformedShape<T, D>::TransformedShape(const Shape<T, D> &s, const Affi
 { }
 
 template<typename T, unsigned D>
-inline TransformedShape<T, D>::TransformedShape(const TransformedShape &other):
+inline TransformedShape<T, D>::TransformedShape(const TransformedShape<T, D> &other):
        shape(other.shape->clone()),
        transformation(other.transformation),
        inverse_trans(other.inverse_trans)
@@ -115,7 +115,7 @@ inline unsigned TransformedShape<T, D>::get_intersections(const Ray<T, D> &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());
                }
        }