Home

1 comment

polymonsterover 5 years ago
I wanted to share my c++ maths library have been adding to for quite a long time now, There are lot of other available maths libraries but I have enjoyed developing and maintaining this over the years since.<p>As a graphics programmer it has been a good learning experience to implement my own maths library from scratch because linear algebra is such an integral part of my job, I also learned a lot about template programming to implement the types and also the vector swizzles.<p>A lot of other available maths libraries provide matrix, quaternion and vectors.. but not as many provide a vast collection of geometric intersection and overlap tests as my library does.<p>Additionally other maths libraries may be SIMD implementations, this library is all scalar and that is my intention all along. I favour the portability and simplicity of the scalar implementation.. I do like SIMD for sure but find that code can be optimised to much greater effect by writing entire algorithms in SIMD and not relying on the underlying vector &#x2F; matrix SIMD implementation.. this is due to often a large number of horizontal operations may be necessary in certain algorithms.<p>This may be a bit dated now, but my experience with SIMD vector implementations on PowerPC were very inefficient because of general use games &#x2F; graphics code often wants to access and set single vector elements and get them into floats and it would cause load hit stores and massive performance penalties, so then you require the scalar float in vec type and add all that additional complexity.<p>Anyway.. I hope people might find this useful if you are looking for a simple c++ maths library packed with great features for graphics and games :)