Home arrow Vector Math
 
Vector Math

The vector_math library (previously known as math3d++) is a C++ 3d math library.

It has classes for 2d, 3d and 4d vectors as well as classes for 2x2, 3x3 and 4x4 matrices and also a quaternion class. A bunch of utility functions to create rotation, transformation and projection matrices and quaternion and vector utility functions (reflect/refract among others) are provided as well.

At the moment the library consits of a single header file and all functions are wrapped in the namespace vmath. The individial classes are templateized so you can use the library with floats, doubles or your own number classes (e.g. for fixed point math). It currently does not have much documentation (only some comments in source) but most functions are very intuitive to use and if necessary you can easily figure out what each function does by looking at the source.

Source code is provided below (The current version has less source code but still provides the same functions and is potentially faster. If you use GCC I recommend you use the -funroll-loops switch):

vector_math.h
vector_math_old.h
 Doxygen processed file which gives an overview of the available functions.
You will also find a few comments in the source itself.
Most of the time the function names should be enough of an explanation.

 

 
< Prev   Next >

Paypal Donate




© 2014 Trenki's Programming Page
Joomla! is Free Software released under the GNU/GPL License.
Template Design by funky-visions.de