You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to compile code which includes both glm/gtc/quaternion.hpp and glm/gtx/compatibility.hpp, I receive the following error:
error: call of overloaded ‘slerp(const quat&, const quat&, const float&)’ is ambiguous
const glm::quat slerped_quat = glm::slerp(first_keyframe_rot, second_keyframe_rot, interpolation_value);
.../animation.cpp:67:109: note: candidates are:
In file included from /usr/local/include/glm/gtc/quaternion.hpp:365:0,
from .../keyframe.h:9,
from .../animation.h:6,
from .../animation.cpp:1:
/usr/local/include/glm/gtc/quaternion.inl:485:33: note: glm::tquat<T, P> glm::slerp(const glm::tquat<T, P>&, const glm::tquat<T, P>&, const T&) [with T = float; glm::precision P = (glm::precision)0u]
GLM_FUNC_QUALIFIER tquat<T, P> slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a)
^
In file included from .../animation.cpp:7:0:
/usr/local/include/glm/gtx/compatibility.hpp:76:58: note: T glm::slerp(const glm::tquat<T, P>&, const glm::tquat<T, P>&, const T&) [with T = float; glm::precision P = (glm::precision)0u]
template <typename T, precision P> GLM_FUNC_QUALIFIER T slerp(tquat<T, P> const & x, tquat<T, P> const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions.
And here's the function call I'm making, with the definitions of the relevant variables:
If I remove either include (and comment out the functions from that header), the code compiles fine. I get the same results in both 0.9.6 and 0.9.5.
I'm afraid I'm not the most experienced with this sort of thing, so if it's a mistake on my end, I apologise in advance for taking up your time. If there's anything else I can provide, please let me know.
Thanks for your great work on GLM,
~Richard Williams
Edit: I've fixed where I accidentally referred to gtc/quaternion as gtx/quaternion and then subsequently referred to a function from gtx/quaternion.
The text was updated successfully, but these errors were encountered:
Pankoi
changed the title
slerp function ambiguity when including both gtx/quaternion.hpp and gtx/compatibility.hpp
slerp function ambiguity when including both gtc/quaternion.hpp and gtx/compatibility.hpp
Dec 10, 2014
Thanks for the quick reply - I really appreciate it.
The fix you've submitted seems to work just fine, thanks! However, for reference purposes, I'll provide the information you requested:
I'm using GCC 4.9.2. The output from GLM_MESSAGES is here. Please note that this is after applying the fix you've provided. If the output from using GLM_MESSAGES with the currently-released build is of more interest to you, I can certainly provide that too.
Thanks again for your time and dedication,
~Richard Williams
Hi,
When attempting to compile code which includes both glm/gtc/quaternion.hpp and glm/gtx/compatibility.hpp, I receive the following error:
And here's the function call I'm making, with the definitions of the relevant variables:
If I remove either include (and comment out the functions from that header), the code compiles fine. I get the same results in both 0.9.6 and 0.9.5.
I'm afraid I'm not the most experienced with this sort of thing, so if it's a mistake on my end, I apologise in advance for taking up your time. If there's anything else I can provide, please let me know.
Thanks for your great work on GLM,
~Richard Williams
Edit: I've fixed where I accidentally referred to gtc/quaternion as gtx/quaternion and then subsequently referred to a function from gtx/quaternion.
The text was updated successfully, but these errors were encountered: