JOGL has some math utilities in the packages "com.jogamp.opengl.math" and "com.jogamp.opengl.math.geom" and "com.jogamp.graph.geom". The size of these APIs is very small but some essential features are missing. It tends to encourage some developers to use third party libraries whereas JOGL could satisfy their needs by reasonably increasing the complexity of the APIs. Moreover, there is some code duplication between projects strongly tied to JogAmp, for example Java3D (Vecmath) and JogAmp's Ardor3D Continuation (own vecmath implementation). Using a single common math API would help several engines to use a subset of JogAmp's Ardor3D Continuation (ardor3d-math + ardor3d-savable + a subset of ardor3d-extras) to load 3D models or to move the importers into jogl-utils and to use them in all JogAmp scenegraph APIs. There are several sources of inspiration: - elect's JGLM - JOML - Vecmath - ardor3d-math The missing features are (non exhaustive list): - matrices containing 2, 3 or 4 integer, float and double values - vectors containing 2, 3 or 4 integer, float and double values - operations that apply on the current "local" object (this) and that create another one (exactly like ardor3d-math) - lerp, slerp, simplex noise, ...
- pre-multiplication of quaternions - Gram-Schmidt orthogonalization: https://github.com/ricardolpd/Ardor3D/commit/7aff0a370fef909a11a5eed9591d6ab7205cd089
- component-wise multiplication - operations to convert from/to NIO buffers - bitangent
- adjugate: http://en.wikipedia.org/wiki/Adjugate_matrix - quaternion inversion (!= conjugate)