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

orientate4 & orientate3 call yawPitchRoll with wrong parameter order #991

Open
RadSteve opened this issue Jan 24, 2020 · 0 comments
Open

Comments

@RadSteve
Copy link

Hi, I noticed that my orientation code spits out random numbers when I use orientate4, but works when i call yawPitchRoll or eulerAngleYXZ.

template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<3, 3, T, Q> orientate3
(
	vec<3, T, Q> const& angles
)
{
	return mat<3, 3, T, Q>(yawPitchRoll(angles.z, angles.x, angles.y));
}

template<typename T, qualifier Q>
GLM_FUNC_QUALIFIER mat<4, 4, T, Q> orientate4
(
	vec<3, T, Q> const& angles
)
{
	return yawPitchRoll(angles.z, angles.x, angles.y);
}

template<typename T>
GLM_FUNC_QUALIFIER mat<4, 4, T, defaultp> yawPitchRoll
(
	T const& yaw,
	T const& pitch,
	T const& roll
)
{
...
}

yawPitchRoll expects the parameters in this order, but orientate4 calls it with reverse order (roll, pitch, yaw) which leads to false results

This seems to be discussed before in #207.

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

No branches or pull requests

2 participants