LEEF math (CPML)

Description

Cirno's Perfect Math Library 🔗

This is a Love (the game framework) library CPML which has been ported and modified to work in the context of Luanti.

Main features 🔗

  • only Luanti Library which implements the ability to manipulate matrices and quaternions and convert them reliably to Irrlicht bone rotations.
  • bounding box modules
  • mat4
  • vec3
  • quaternions
  • octrees
  • bvh lib
  • more

Adapted for Luanti 🔗

For best memory performance: have luaJIT & it's FFI library (this should be built into luaJIT), and add LEEF-Math to your trusted list (so it can require() call the FFI library).

Various useful bits of game math. 3D line intersections, ray casting, 2d/3d vectors, 4x4 matrices, quaternions, etc.

This is a fork of CPML (for LÖVE/love3d), it's been ported over the minetest so it can be used in whatever you need it for. Documentation can be found here: https://luanti-extended-engine-features.github.io/LEEF-Math/.

For possible future contributors: documentation must be generated manually when a commit is made, because I haven't set up workflows (and have no idea how to).

TODO: 🔗

  • Vec3s and Vec2s are not currently adapted for functionality with MT vectors, fix.

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.

Releases

2025-01-15 02:18 UTC

1.0.1 🔗

  • fix gimbal lock cases for XYZ and ZXY euler outs
2025-01-12 06:57 UTC

1.0.0 🔗

  • fixed and redocumented mat4.mul()
  • add basic rotation operations to matrices
  • removed individual documentation in favor of a master site
  • documentation updates, readme update
  • finished documentation for intersects.lua
  • cleared documentation errors in color.lua, mat4.lua, intersect.lua
  • fixed doc errors in quat.lua
  • fix bound2 module
  • finish documentation error removal
  • documentation fixes for intersect module
  • update
All releases