lmi is a simple heady only library for C++ mainly intended for computer graphics applications and tries to resemble GLSL syntax.
- Good CMake Integration
constexprwhere possible - Run linear algebra computations at compiletime- Completely generic, you can create integer vector types or use
__float128, boost.multiprecision or boost.units - No heap allocations - Easy to integrate in software running in a freestanding enviroment
- IO is compatible with MATLAB
- Useful for high dimensional problems: Again, no heap allocations. You will likely run into a stack overflow or get bad performance because of excessive copies.
- Well tested. Take a look at glm for that.
- Any C++14 Compiler that supports anonymous structs, however this has only been tested on gcc 6.1 and clang 3.9
None required. Copy the contents of the include directory in your project. Or take a look at the [How to import](#How to import) Example
There is a PKGBUILD in this repository. Clone it, then makepkg -si.
cd clonedRepository
mkdir build
cd build
cmake .. && make && sudo make installcmake_minimum_required(VERSION 3.6)
project(sharklasercontrol)
find_package(lmi REQUIRED)
# Or, if you just copied the entire repository
add_subdirectory(lmi)
add_executable(sharklasercontrol main.cpp)
target_link_libraries(sharklasercontrol lmi::lmi)#include <lmi/lmi.h>
#include <lmi/iostream_support.h>
#include <iostream>
auto main() -> int
{
lmi::vec3 a(1, 2, 3), b(4, 5, 6);
auto c = lmi::cross(a, b);
lmi::mat3 scale = lmi::scale(2.0f, 2.0f, 2.0f);
lmi::mat3 rotate = lmi::rotateAngles(90.0f, 0.0f, 0.0f);
std::cout << scale * rotate * c << std::endl;
// [2.68844 -5.36398 0]'
}