Matrix Math

BlitzMax Forums/BlitzMax Programming/Matrix Math

BLaBZ(Posted 2013) [#1]
Hello All -

Is there an already existent matrix math library available?

It wouldn't be too difficult to create my own but I was wondering if one already existed so I could have a look at the convention and performance.

A few things it needs to do - matrix multiplication, transpose, inverse, calculate determinant.

Thanks!
-BlaBZ


Yasha(Posted 2013) [#2]
You can use the geometry code from B3D if you like, which includes all of those things in its Matrix class: http://www.blitzbasic.com/Community/posts.php?topic=42657

The original (taken from B3D itself) is C++; there is also a BlitzMax translation further down courtesy of SimonH. Si suggests that the BlitzMax version may not be as fast (especially if you can get the C++ one to compile with SSE, I imagine).


UNZ(Posted 2013) [#3]
Irrlicht has matrix/vector stuff as well. But I think it is a bit over the top to import a complete render engine only for the math, isn't it?


Kryzon(Posted 2013) [#4]
A few more BMax references:
https://github.com/kfprimm/prime.mod/blob/master/math3d.mod/math3d.bmx
https://github.com/si-design/minib3d/blob/master/inc/TMatrix.bmx