I'm looking for a fast opensource C++ math-library for my game engine with the following features:
- fast (sse?)
suitable for both opengl and directx
XNA Math might be for you. It's a header only C++ math library that is distributed with the latest DirectX SDK and uses SSE intrinsics. I can't talk much about its performance but from what I read about it, it seems to be pretty decent.
EDIT: I'm also not sure about the licensing terms. The DX SDK Eula states that "Distributable Code" may not be
"run on a platform other than the Windows, Xbox and Windows Mobile platforms;"
I'm not entirely sure whether this applies for xna math as only sample and utility code is explicitly marked as "Distributable Code"
We use OpenGL Mathematics
Even though the name implies it's just for OpenGL I see no reason it wouldn't work for DirectX. It's a header only library, easy to use and is very actively updated.
Check it out.
Maybe CML http://www.cmldev.net/
Sony's vectormath library, used as part of Bullet Physics, meets all your requirements. Some work is involved to separate it from Bullet, but nothing serious - it doesn't depend on bullet, just that no one ever packaged it officially apart from it.
The version currently in the bullet tree supports SSE optimizations, and has a C++ interface.
Or, for speed, http://sourceforge.net/projects/simdx86/.