May 6, 2013 at 7:10 PM
Do you have thought about supporting quaternions?
May 7, 2013 at 12:58 AM
I don't have anything against them, but I haven't run into a situation where I needed them explicitly. Is that something that would help you out?
May 7, 2013 at 12:57 PM
I dont need it at the moment. But i thought its good to provide them in the future, because working with matrices in a 3d environment has not always benefits. And Quaternions brings some nice functionality. Perhaps for your TODO-list in the future.
May 7, 2013 at 1:49 PM
fwiw, at this point I rely on DirectXMath for all my quaternion needs, and all my math needs in general. (I've found quats indespensible for e.g. building camera systems that needs to slerp between two positions/orientations):

The main issue with it is that its API makes my eyes bleed and is tough. Thankfully it has been wrapped into a nice XNA-like API:

Of course this incurs load/store penalties with every call which kinda defeats the purpose of SSE but for [the majority of cases] where you don't need to worry about top performance it yield you access to a quite complete and presumably correct math library. And then you can just switch to the lower-level API when profiling shows you really need it.

p.s. Based on some experimentation, it appears it's also possible with a C++11 compiler, clever use of type traits, and some template meta-programming, to build a wrapper that generates mostly the same code as the raw API - but for most use-cases the aforementioned approach should be 'good enough'.

May 8, 2013 at 12:15 AM
@jmkinzer: I saw the SimpleMath library before it was released from within the MVP discussion group, and they more or less echoed your comments. It is easier to use, but in general is not efficient. That is ok in some situations, like you mentioned, but not a good thing to propagate into another library (at least in my opinion).

I think it would be fairly simple to add a quaternion class or two for working with rotations. I'll have to take a closer look at the math behind them (its been at least 5 years since I read about them - maybe even more...) and then I'll try to put together the classes to represent them and add them to the mathematics folders.

@TypeOverride: would you like to create an issue in the bug tracker to add these? It is always easier for me to manage the tasks through there instead of through discussion tabs when it comes down to work items.

Thanks in advance!
May 9, 2013 at 3:00 AM
I can refer to https://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/math/Quaternion.java
Ive not worked much with the library for smartphones.. but there are Quaternions too.

Quaternions are great for interpolation task. Matrices are bad bad bad for this! So i hope to see this, but like i said before ... at the moment in dont need them. But its a missing part.

I can make a issue entry.