View Full Version : SLERP - Quaternion Interpolation
02-07-2011, 01:12 PM
Is Quaternion Interpolation (SLERP) function available in (GLM)GLMath? I simply can not find it. In my opinion, it is quite necesary function. If it not yet present, I would strongly vote for implementing it.
02-07-2011, 02:06 PM
If you're talking about GLM, it's available as an overload of the "mix" function.
02-07-2011, 02:26 PM
yes, I was talking about GLM. Would you be so kind to tell me where to find that "mix" function? I discovered GLM today, so probably, I do not know yet, where is what I need. Thanks.
02-07-2011, 02:54 PM
Would you be so kind to tell me where to find that "mix" function?
It's defined in the same file you include to get access to quaternions. Like all GLM types and functions, it is defined in the "glm" namespace.
02-07-2011, 03:49 PM
Ah, I will have to include Quaternions extenstion of GLM. Thank you very much. I am happy to have SLERP.
02-07-2011, 03:59 PM
//! Returns a LERP interpolated quaternion of x and y according a.
//! From GLM_GTC_quaternion extension.
template <typename T>
detail::tquat<T> const & x,
detail::tquat<T> const & y,
typename detail::tquat<T>::value_type const & a);
unless I'm missing something (quite possible I'm not using GLM) it only does a lerp not slerp.
02-07-2011, 04:59 PM
thank you very much for your information. Well, I would appreciate SLERP instead of LERP, as SLERP should provide better smoothnes.
Thank you very much, indeed.
02-07-2011, 06:39 PM
It does SLERPing. You can see it in the implementation, regardless of what the documentation says.
02-08-2011, 02:31 AM
Yes, it's a documentation error.
02-08-2011, 04:29 AM
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.