Use System.Numerics.Quaternion instead of BepuUtilities.Quaternion
See original GitHub issueI’m trying to integrate BepuPhysics into my game engine, but I found it very frustrating needing to constantly convert between System.Numerics.Quaternion
and BepuUtilities.Quaternion
since I always use the former for transforms in my engine and various other places. It doesn’t even offer a cast.
Now I understand that BepuUtilities.Quaternion
offers more functionality, but since that is only provided through static methods, it would be better to put those that are missing from System.Numerics.Quaternion
in a separate extension class with a different name that takes System.Numerics.Quaternion
as inputs/outputs. This would also remove the need to declare the right Quaternion in a using declaration.
(Same goes for BepuUtilities.Matrix
and BepuUtilities.Plane
.)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top GitHub Comments
It’s on the chopping block. Just a question of when I get around to verifying codegen for the
System.Numerics.Quaternion
(the reason the BepuUtilities version exists is mostly the JIT emitting a bunch of extra copies for the numerics version). There will still need to be some kind of BepuUtilities helper to cover some of the special cases, but that doesn’t need to cause name collisions.QuaternionEx
, operating onSystem.Numerics.Quaternion
, replacesQuaternion
in 50f86577e666593156e9ec0adfdd0ba2e25140fd.