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

orientate3 vs. orientate4 #207

Closed
mortennobel opened this issue May 25, 2014 · 3 comments
Closed

orientate3 vs. orientate4 #207

mortennobel opened this issue May 25, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@mortennobel
Copy link

There seems to be an inconsistency between orientate3 vs. orientate4 (eulers_angles.inl). Note that the parameters of yawPitchRoll is different. I believe the orientate4 is the correct order.

template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat3x3<T, P> orientate3
(
    detail::tvec3<T, P> const & angles
)
{
    return detail::tmat3x3<T, P>(yawPitchRoll(angles.x, angles.y, angles.z));
}

template <typename T, precision P>
GLM_FUNC_QUALIFIER detail::tmat4x4<T, P> orientate4
(
    detail::tvec3<T, P> const & angles
)
{
    return yawPitchRoll(angles.z, angles.x, angles.y);
}
@mortennobel
Copy link
Author

I would guess that both approaches are wrong. Shouldn't the correct solution be yawPitchRoll(angles.y, angles.x, angles.z);?

@Groovounet Groovounet added the bug label Jun 11, 2014
@Groovounet Groovounet added this to the GLM 0.9.5 milestone Jun 11, 2014
@Groovounet Groovounet self-assigned this Jun 11, 2014
Groovounet pushed a commit that referenced this issue Jun 11, 2014
@Groovounet
Copy link
Member

You are right orientate3 is broken. This is now fixed in GLM 0.9.5 branch.

Maybe logically the function should be "yawPitchRoll(angles.y, angles.x, angles.z);" but the implementation work in reverse order...

Thanks for contributing,
Christophe

@DashW
Copy link

DashW commented Aug 30, 2014

Still confused as to why orientate4 is calling yawPitchRoll with the parameters ZXY... the function eulerAnglesYXZ has exactly the same implementation as yawPitchRoll, so does that expect the same ordering as well? Something's not right here...

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

No branches or pull requests

3 participants