diff --git a/Eigen/src/Geometry/Transform.h b/Eigen/src/Geometry/Transform.h index 47e4b2925..186580ab4 100644 --- a/Eigen/src/Geometry/Transform.h +++ b/Eigen/src/Geometry/Transform.h @@ -1013,6 +1013,29 @@ struct ei_transform_right_product_impl { return tr.linear() * other + tr.translation(); } }; +// Affine * homogeneous column vector +// FIXME added for backward compatibility, but I'm not sure we should keep it +template +struct ei_transform_right_product_impl +{ + typedef Transform TransformType; + typedef Matrix ResultType; + static ResultType run(const TransformType& tr, const Other& other) + { return tr.matrix() * other; } +}; +template +struct ei_transform_right_product_impl +{ + typedef Transform TransformType; + typedef Matrix ResultType; + static ResultType run(const TransformType& tr, const Other& other) + { + ResultType res; + res.template start() = tr.matrix() * other; + res.coeffRef(Dim) = other.coeff(Dim); + } +}; + // T * linear matrix => T template struct ei_transform_right_product_impl