question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use System.Numerics.Quaternion instead of BepuUtilities.Quaternion

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
RossNordbycommented, Jan 26, 2020

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.

0reactions
RossNordbycommented, Jan 28, 2020

QuaternionEx, operating on System.Numerics.Quaternion, replaces Quaternion in 50f86577e666593156e9ec0adfdd0ba2e25140fd.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Quaternion Struct (System.Numerics)
Constructs a quaternion from the specified components. Quaternion(Vector3, Single). Creates a quaternion from the specified vector and rotation parts.
Read more >
3D Rotation using System.Numerics.Quaternion
Anybody here know how to rotate a vector3 using .net(4.6 and up) System.Numerics.Quaternion? My maths is pretty poor though and my understanding ...
Read more >
Quaternion.Normalize(Quaternion) Method
Divides each component of a specified Quaternion by its length.
Read more >
System.Numerics
Vectors/src/System/Numerics In .NET there are equal Vector2, Vector3, Vector4, Quaternion and so on implemented.
Read more >
Add support System.Numerics.Vectors types with double ...
For example, to use Vector3 and Matrix4x4 with double precission we will be able ... Quaternion<T> rotation); [MethodImpl(MethodImplOptions.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found