-
Notifications
You must be signed in to change notification settings - Fork 13
Introduction
Péter Kardos edited this page Jan 27, 2018
·
6 revisions
Mathter is a linear algebra and geometry library primarily for game developers. What sets it apart from the rest is the possibility to configure it to use your conventions, so it will certainly click with the rest of your code. The library puts great effort on making the API easy, intuitive, and as little code as possible. Additionally, it is SIMD accelerated, so you can expect it to be fast.
Main features of the library:
- Header-only: just include Mathter/*.hpp
- Vectors, matrices, quaternions, hyperplanes, parametric lines
- In any space dimension
- Configurable:
- Base data type: float, double, integer
- Space dimension
- Preferred multiplication order: vectormatrix or matrixvector
- Memory layout: row-major and column-major matrices
- Tight packing: removes alignment requirements and padding from between elements (disables SIMD as well)
- SIMD acceleration, optimized for small matrices
- Vectors:
- Arithmetic operators
- Dot product, cross product (in higher dimensions as well)
- Concatenation
- Swizzle operators
- Matrices:
- Arithmetic operators
- Common: trace, determinant, inverse, transpose
- Transforms: translation, scale, shear, various rotations, perspective and orthographic projection, camera view
- Decomposition: LU, LUP, QR, SVD
- Geometry:
- Hyperplane-line and line segment intersection
- Line-line, line segment-line segment intersection in 2D
- Point distance from plane
Shortcomings:
- No dynamically sized matrices and vectors
- Slow compilation: explicit template specialization in your project helps with this
- Vector and matrix FP32 arithmetic has full SIMD support, but no FP64 support yet. Others, such as swizzling, is not SIMD accelerated.
- Home
- Introduction
- Installation
-
Usage
- Vectors
- Matrices
- Vector functions
- Matrix functions
- Geometry