This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 487 - Transform concatenation fails with THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS
Summary: Transform concatenation fails with THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORM...
Status: RESOLVED FIXED
Alias: None
Product: Eigen
Classification: Unclassified
Component: Geometry (show other bugs)
Version: 3.1
Hardware: All All
: Normal major
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 14:04 UTC by Ferdinand Beyer
Modified: 2019-12-04 11:46 UTC (History)
3 users (show)



Attachments

Description Ferdinand Beyer 2012-07-03 14:04:06 UTC
The following code fails to compile because of the static assertion THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS:

    Affine2f a = Translation2f(Vector2f(1, 1)) *
                 Rotation2Df(-0.5f) *
                 Scaling(2.0f);

Origin in Geometry/Transform.h, line 809:

Transform<Scalar,Dim,Mode,Options>& Transform<Scalar,Dim,Mode,Options>::scale(Scalar s)
{
  EIGEN_STATIC_ASSERT(Mode!=int(Isometry), THIS_METHOD_IS_ONLY_FOR_SPECIFIC_TRANSFORMATIONS)

I guess that (Translation * Rotation) yields a temporary isometry, and this cannot be scaled.

My current workaround is to switch the order of rotation and scaling:

    Affine2f a = Translation2f(Vector2f(1, 1)) *
                 Scaling(2.0f) *
                 Rotation2Df(-0.5f);
Comment 1 Gael Guennebaud 2012-07-04 18:26:35 UTC
thank you for the report, fixed:

https://bitbucket.org/eigen/eigen/changeset/71230229983b/
changeset:   71230229983b
user:        ggael
date:        2012-07-04 18:25:07
summary:     fix bug 487: isometry * scaling was not compiling

https://bitbucket.org/eigen/eigen/changeset/20f06227c1d4/
changeset:   20f06227c1d4
branch:      3.1
Comment 2 Nobody 2019-12-04 11:46:28 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/487.

Note You need to log in before you can comment on or make changes to this bug.