f



3d math library

hi,

I know, this is not the perfect newsgroup to ask for, but worth a try :)
I'm in need of a math library which should have those features in descending
order
(from important to less imporant):

* free
* small! (only vecs 2d and 3d, matrices quaternions and stuff to manipulate
and create those)
* left-handed (the Direct3D-way)
* bug free and completed (no alpha or such)
* portable
* OO, (speek: syntactic shugar)
* a syntax like this:

    vector3 v(1.0, 2.0, 3.0);
    v.normalize();
    matrix4 m;
    m.make_rotation(blah, foo, bar);
    vector3 v2 = v * m;
    // and so on and so on

I could do it own my own, but with my maths ingenuity it would take days and
megabytes of tutorials.
thx a lot, and sorry for bothering (i did not found any suitable one on sf,
freshmeat, google, programmersheaven).

Alex



0
hirner (2)
8/1/2003 8:35:54 PM
comp.lang.c++ 49423 articles. 6 followers. Post Follow

1 Replies
564 Views

Similar Articles

[PageSpeed] 52

On Fri, 1 Aug 2003 22:35:54 +0200, "Alex Hirner" <hirner@yahoo.com>
wrote:

>
>hi,
>
>I know, this is not the perfect newsgroup to ask for, but worth a try :)
>I'm in need of a math library which should have those features in descending
>order
>(from important to less imporant):
>
>* free
>* small! (only vecs 2d and 3d, matrices quaternions and stuff to manipulate
>and create those)
>* left-handed (the Direct3D-way)
>* bug free and completed (no alpha or such)
>* portable
>* OO, (speek: syntactic shugar)
>* a syntax like this:
>
>    vector3 v(1.0, 2.0, 3.0);
>    v.normalize();
>    matrix4 m;
>    m.make_rotation(blah, foo, bar);
>    vector3 v2 = v * m;
>    // and so on and so on
>
>I could do it own my own, but with my maths ingenuity it would take days and
>megabytes of tutorials.
>thx a lot, and sorry for bothering (i did not found any suitable one on sf,
>freshmeat, google, programmersheaven).
>
>Alex
>
>
OT obviously, but since I happen to have a url that may be a good
start...

As far as a quat library, one that is in decent OOP form, you can try
here:
http://personal.nbnet.nb.ca/daveg/opengl/quatdemo/index.html

included is a template class header file as well that has necessary
quaternion related functions needed for object rotations.

the cubedemo is opengl but does include functionally correct use of
quaternion as it can apply to rotating an object in 4d hyperspace..

free, yes
is it bug free, probably not, but i got it to work in vc++ and g++
D3D, nope.. OpenGL ;-)
OOP, yes

as far as syntax, you will need to fully understand what this mini lib
actually does before you can use it.

0
Charles
8/2/2003 1:30:12 AM
Reply: