xmath - provide implementation or replace by glm
SSE4 opened this issue · 2 comments
there is xmath library which we don't currently have source for.
right now, it's available as pre-built Visual Studio 2005 library only.
it means, if we decide to port to another architecture (x64) or platform (Linux/Mac), we have to provide an implementation.
xmath provides:
- vectors (Vect3f, Vect3d, etc.)
- quaternions (QuatF)
- matrices (Mat3f, Mat3d, etc)
and various functions to manipulate with them (invert, product, etc.)
there are currently two different xmath.h
headers:
https://github.com/KranX/Perimeter/blob/init/Source/Util/xmath.h
https://github.com/KranX/Perimeter/blob/init/XLibs.Net/xmath.h
there is also umath.h
header: https://github.com/KranX/Perimeter/blob/init/Source/Render/inc/Umath.h
which provides similar classes (vectors).
GLM project might be a good replacement for these classes, need to check if it has all functions needed.
Small update, on cmake branch the two xmath.h were merged into one and moved to https://github.com/KranX/Perimeter/blob/cmake/Source/XTool/xmath.h which also has the original xmath.cpp
umath.h seems to be a graphics related superset of xmath.h, in future if we end up using another renderer it may be necessary to change these or scratch it... for example CMatrix has a casting operator to DirectX D3DXMATRIX
Might be worth reviewing if is worth moving to GLM now that we got xmath sources...
Yes, I think it will be good to replace these functions to standard.