Jump to content
  • Advertisement
Sign in to follow this  
Void

Is there any high performance maths library

This topic is 3942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi Is there any optimized maths library around you can recommend? I'm looking around, I can't find any that is very full featured and optimized with SSE2 etc. Intel Maths Library don't support quaterion, AMD don't either etc.

Share this post


Link to post
Share on other sites
Advertisement
Well I don't know if you're using directX to get some graphics on your screen, but D3DX is very fast. I don't know if it supports quaternions however.

Share this post


Link to post
Share on other sites
No, no d3dx. Would be consoles based in future, so prefer not to have directx dependency. Also, the API interface in d3dx still rather C like.

Share this post


Link to post
Share on other sites
I have sworn to support CML, but it is not optimized quite like you say.

I think it is full-featured though (quaternions)

http://cmldev.net/

Share this post


Link to post
Share on other sites
Quote:
Original post by Void
No, no d3dx. Would be consoles based in future, so prefer not to have directx dependency.


You might like to check out the open source Sony vectorized math library, which is available to download as part of the Bullet dynamics engine.

You can download Bullet from here and then look in the Extras/vectormathlibrary directory for the math library source.

It implements classes like Matrix3, Matrix4, Point3, Quat, Transform3, Vector3 and Vector4, and has optimsed versions for SSE, (PS3) PPU and SPU, as well as a standard (cross-platform) scalar version. It also has both C and C++ interfaces.


Share this post


Link to post
Share on other sites
I checked out the Sony library. It's pretty, and twice as fast as simple implementations. But the debug version is somehow twice as slow, strange though.

Unfortunately, it still missing a few bits like Plane class, projection matrices, but otherwise looking good.

Share this post


Link to post
Share on other sites
My approach is a little different. I have a matrix and vector maths system which is an wrapper with the underlying physics engine, and then a bunch of functions whcih use <cmath>.

The problem was that I kept changing physics engines (first bullet, then ODE, now newton) and I wanted to use the same matrix and vector maths system as the physics system. I was using matrices in my camera system, and for the AI. The upside to this is that I don't have to go through my code and change the maths calls when I change physics engines. When I use it in an application with no physics engine, I use my own system, but that's not been the case for over a year.

Why not try that? Pick one, and write a wrapper to it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!