Skip to content

Introduction

Péter Kardos edited this page May 20, 2017 · 6 revisions

Mathter is a linear algebra and geometry library for primarily 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 user code as possible. Additionally, it is SIMD accelerated, so you can expect it to be fast.

Main features of the library (To Be Added (TBA) features in parentheses):

  • Header-only: just include Mathter/*
  • Vectors, Matrices, (Quaternions TBA), Hyperplanes, Parametric lines
  • In any dimension
  • Configurable:
    • Base data type: float, double, integer (std::complex, custom TBA)
    • 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, various rotations, perspective and orthographic projection, camera view, (reflect, higher D rotations TBA)
    • Decomposition: LU decomposition, (SVD TBA)
  • Geometry:
    • Hyperplane-line and line segment intersection
    • Line-line, line segment-line segment intersection in 2D
    • Distance from plane (distance from line and line segment TBA)

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.
Clone this wiki locally