Mirsario / SteamAudio.NET

Auto-generated C# / .NET bindings for Valve's Steam Audio (Phonon)
Other
21 stars 4 forks source link

System.Numerics Math instead of new types? #5

Open Doprez opened 3 months ago

Doprez commented 3 months ago

I noticed this library created new Vector3/Matrix4x4 types instead of using the built in C# math types. Is there a reason for this or is it just how the generation works?

I could create a PR to make implicit conversions if we cant just use the built in types but I assume they shouldn't go into the generated file so I would likely just need to create them outside in separate classes.

Mirsario commented 3 months ago

This isn't because of a conscious decision, but just the default behavior of the used generator. It would be nice to switch to Numerics, but it'll have to be made extra-clear everywhere that SteamAudio expects row-major matrices, while Numerics' are column-major, prompting transposition. If I'm correct here.

Doprez commented 3 months ago

I think numerics are row major?

I'm currently having a similar issue with the game engine I'm messing with since they are using column major for their implementation. Worst case I think I should be able to do the same thing that was done in this Stride PR for implicit conversions.