Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape's createTransformationMatrix is buggy #197

Open
Matyooo opened this issue Aug 31, 2016 · 2 comments
Open

Shape's createTransformationMatrix is buggy #197

Matyooo opened this issue Aug 31, 2016 · 2 comments

Comments

@Matyooo
Copy link

Matyooo commented Aug 31, 2016

Hi all$ @amazingsmash , @DiegoGomezDeck , @akosmaroy

I think a caught a bug for you. Shape.cpp:85 was:

const MutableMatrix44D localTransform = headingRotation.multiply(pitchRotation).multiply(rollRotation).multiply(translation).multiply(scale);
should be:
const MutableMatrix44D localTransform = translation.multiply(headingRotation).multiply(pitchRotation).multiply(rollRotation).multiply(scale);

The right order of transformations is scale first, then rotations around origo then translation.
What do you think?

@amazingsmash
Copy link
Contributor

Hi @Matyooo ,

I think you are right. The current operation (TV = R_T_S*V) rotates the vertex after being translated, ending up in a rotation that is no longer intrinsic to the object.

An animated rotation with a fix translation of a model shows the effects. I checked the TV = T_R_S*V transformation and it seems to produce proper results.

@DiegoGomezDeck
Copy link
Member

Any pull request to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants