Math behind math:: with the engine's own storage types #12
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Depends on
#5 Unit tests with doctest
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
DirectXMath leaked into every header, including the game API. Isolating it keeps the option to replace functions where measurement says so, and gives game code one math API.
Decided
math::(GLM, rtm and an own SSE prototype were measured: Math sections 2-5).v2-v4,m4x4, ...) are the engine's own plain aggregates inEngine/Utilities/MathTypes.h, with DirectXMath's layout; matrices have members_11..._44.math::vec/math::matwithload()/store()/to_v3(); DirectXMath is named only inEngine/Utilities/Math*.h(Tools/check_math_usage.py).rotate3(),math::Frustum).EngineAPI/includesUtilities/Math.h); the fork forgot this (UnflavoredMeson/Primal#68).Read first
Engine/Utilities/Math.handMathTypes.honmaster.Steps
UnitTests/MathTests.cppfor what the engine uses today (quaternions from Euler angles, matrix multiply, inverse) against DirectXMath's results.MathSimd.hwith thevec/matwrappers and forwarders until the tests pass.MathTypes.hwith own structs; fix the compile errors.check_math_usage.pyand move every DirectXMath use behindmath::.Done when
check_math_usage.pypasses; MathTests pass in Debug and Release; 0 warnings both OSes; tidy 0.Claude can help with
XM_CALLCONVdetails on MSVC.Learn
__vectorcallchanges for passing SIMD registers.