Sign in to follow this  

Looking for a good vector/matrix library

This topic is 3773 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

i've been testing boost, but it doesn't provide geometrical things like the crossproduct of vectors, or reflecting it, etc. i can't use any library whose licence forces me to publish the source code (and im not the one deciding that). i'd like it to be templatized, preferably SIMD optimized, and with (at least optional) column major matrixes (so i can use them with opengl with ease). any ideas? (yes, i've been googling, but i was not convinced).

Share this post


Link to post
Share on other sites
Quote:
Original post by ElPeque2
i've been testing boost, but it doesn't provide geometrical things like the crossproduct of vectors, or reflecting it, etc.

i can't use any library whose licence forces me to publish the source code (and im not the one deciding that).

i'd like it to be templatized, preferably SIMD optimized, and with (at least optional) column major matrixes (so i can use them with opengl with ease).

any ideas?

(yes, i've been googling, but i was not convinced).
Hi ElPeque2,

I've already been in touch with you via PM, but I'll go ahead and post here as well (just to make sure you get all your questions answered!).

Basically, the CML meets all of your stated requirements except for SIMD optimization: it's distributed under the Boost Software License (which is just about the least restrictive license out there, at least as far as I know - in any case, you do not have to publish your own source code when using the CML); it supports any combination of row- or column-major matrices and row- or column-vector notation, and exposes several other options via template configuration as well; it's fully compatible with OpenGL (and D3D/DirectX); and it has a comprehensive library of geometrical and transform-related functions for both 2d and 3d.

Regarding the SIMD thing, our first goal with the CML was portability, so we haven't tackled the problem of platform-specific optimizations yet. With a decent compiler, the CML should perform as well as hand-written C code, but if you find that this doesn't meet your performance requirements, there are ways to use the CML alongside another (SIMD-accelerated) library (thereby benefiting from the CML's large collection of transform and utility functions).

Anyway, having gotten the obligatory self-promotion out of the way, I'll say that there are enough free math libraries floating around out there that you may very well be able to find an OpenGL-compatible library with a friendly license that is also SIMD-accelerated. I myself can't think of any such libraries at the moment, but maybe someone else can provide some additional info in this area.

Share this post


Link to post
Share on other sites
You might like to check out Sony's Vector Math Library, which although was originally developed for the PS3, also comes with a SIMD (SSE) version for x86, and a portable scalar version for other platforms.

It was recently made open source via Erwin Coumans bullet library, and you can download it here...

http://www.continuousphysics.com/Bullet/phpBB2/viewtopic.php?t=1322

Share this post


Link to post
Share on other sites
i've been playing with CML which has everything im asking for, except SIMD (not that important anyway). Until now, it's working fine.

I'd just like to test "all" the alternatives before i marry any library.

Same with women, so i guess ill never get marryed XD.

thanks to both of you :).

Oh! by the way, what is the BSD licence like? Do i have to publish the source with the project??

Share this post


Link to post
Share on other sites

This topic is 3773 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this