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
Based on your ideas I found an implementation that makes the function to look like this: glm::quat const Q = glm::identity<glm::quat>(); glm::mat4 const M = glm::identity<glm::mat4x4>();
I should be able to extend this to glm::x_axis<glm::vec3>().
There's no easy way of getting an identity for quaternions
In the experimental headers, there's a function
As
quad_identity
accepts no function arguments, you have to pass the template argumentsT
andQ
explicitely resulting in calls likewhich in my opinion reveals more knowledge of glm implementation details than necessary.
My personal preference
My personally prefered would be to return to the old way of calling
or something comparable like using static class functions for easy initialization in general:
But for some reason, this was removed, so I assume that's not an option. So here are two other suggestions:
Alternative suggestion1: initialization template class
A template class providing static functions with interesting values.
Something comparable to
std::numeric_limits
;)This would make typical values quickly accessible
Here the user has to provide only the quat type he wants to use as template argument
Alternative suggestion 2:
A function only accepting the whole quat type as only argument
This implemetation could be used like this:
Here the user also has to provide only the quat type he wants to use as template argument
The text was updated successfully, but these errors were encountered: