diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-08-06 11:02:03 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-08-06 11:02:03 +0200 |
commit | b9b17ea5a534a692700f643ca5f7daf6e327f81c (patch) | |
tree | a2f4a5294866a6af3b0fd1bead7ea83ea8fa5dec /Eigen | |
parent | 0744638b6f27d930393d190145512afcd5c50832 (diff) |
add the missing Affine Transform * set of column vectors products...
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Geometry/Transform.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index da3187e3c..842a6bb4e 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -1034,6 +1034,17 @@ struct ei_transform_right_product_impl<Other,Mode, Dim,HDim, Dim,1> { return tr.linear() * other + tr.translation(); } }; +// Affine * set of column vectors +// FIXME use a ReturnByValue to remove the temporary +template<typename Other, int Mode, int Dim, int HDim> +struct ei_transform_right_product_impl<Other,Mode, Dim,HDim, Dim,Dynamic> +{ + typedef Transform<typename Other::Scalar,Dim,Mode> TransformType; + typedef Matrix<typename Other::Scalar,Dim,Dynamic> ResultType; + static ResultType run(const TransformType& tr, const Other& other) + { return (tr.linear() * other).colwise() + tr.translation(); } +}; + // Affine * homogeneous column vector // FIXME added for backward compatibility, but I'm not sure we should keep it template<typename Other, int Mode, int Dim, int HDim> |